PageSourceSearch

https://boclaw.ai/assets/i18n-a82fFqkZ.js

js boclaw.ai collected 2026-10-05 13:36:53 UTC 68,381 bytes, 1 lines download raw bytes

1import{g as ze,R as Z,r as $}from"./react-core-Ds2bl9oX.js";import{_ as Be,a as Je}from"./semi-ui-Cg0z1Esl.js";function oe(){return oe=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(n[s]=t[s])}return n},oe.apply(null,arguments)}var We={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const Qe=ze(We);var Ye=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function he(n){var e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},t=n.match(/<\/?([^\s]+?)[/\s>]/);if(t&&(e.name=t[1],(Qe[t[1]]||n.charAt(n.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){var s=n.indexOf("-->");return{type:"comment",comment:s!==-1?n.slice(4,s):""}}for(var i=new RegExp(Ye),r=null;(r=i.exec(n))!==null;)if(r[0].trim())if(r[1]){var a=r[1].trim(),o=[a,""];a.indexOf("=")>-1&&(o=a.split("=")),e.attrs[o[0]]=o[1],i.lastIndex--}else r[2]&&(e.attrs[r[2]]=r[3].trim().substring(1,r[3].length-1));return e}var Ze=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,qe=/^\s*$/,Ge=Object.create(null);function Ie(n,e){switch(e.type){case"text":return n+e.content;case"tag":return n+="<"+e.name+(e.attrs?function(t){var s=[];for(var i in t)s.push(i+'="'+t[i]+'"');return s.length?" "+s.join(" "):""}(e.attrs):"")+(e.voidElement?"/>":">"),e.voidElement?n:n+e.children.reduce(Ie,"")+"</"+e.name+">";case"comment":return n+"<!--"+e.comment+"-->"}}var Xe={parse:function(n,e){e||(e={}),e.components||(e.components=Ge);var t,s=[],i=[],r=-1,a=!1;if(n.indexOf("<")!==0){var o=n.indexOf("<");s.push({type:"text",content:o===-1?n:n.substring(0,o)})}for(var l,u=[];l=Ze.exec(n);)u.push(l);return u.forEach(function(f,g){var c=f[0];if(c&&!c.startsWith("<!--")){for(var p=0,x=0,v=-1,m=null,S=0;S<c.length;S++){var d=c.charAt(S);m?d===m&&(m=null):d==='"'||d==="'"?m=d:d==="<"?++p==2&&(v=S):d===">"&&x++}var L=v>-1&&/[a-zA-Z0-9\-!/]/.test(c.charAt(v+1));if(p>x&&L){var y=c.substring(0,v),b=c.substring(y.length);u[g][0]=b,u[g].index+=y.length}}}),u.forEach(function(f,g){var c=f[0];if(c){var p=f.index;if(a){if(c!=="</"+t.name+">")return;a=!1}var x,v,m=c.charAt(1)!=="/",S=c.startsWith("<!--"),d=p+c.length,L=n.charAt(d),y=u[g+1];if(L==="<"&&y){var b=n.substring(d,y.index);x=b.split("<").length>b.split(">").length}if(S){var h=he(c);if(r<0)return s.push(h),s;(v=i[r]).children.push(h);var O=n.slice(d,y?y.index:void 0);return O.length>0&&v.children.push({type:"text",content:O}),s}if(m&&(r++,(t=he(c)).type==="tag"&&e.components[t.name]&&(t.type="component",a=!0),t.voidElement||a||!L||L==="<"||t.children.push({type:"text",content:n.slice(d,y?y.index:void 0)}),r===0&&s.push(t),(v=i[r-1])&&v.children.push(t),i[r]=t),(!m||t.voidElement)&&(r>-1&&(t.voidElement||t.name===c.slice(2,-1))&&(r--,t=r===-1?s:i[r]),!a&&(L!=="<"||x)&&L)){v=r===-1?s:i[r].children;var P=y?y.index:-1,C=n.slice(d,P===-1?void 0:P);qe.test(C)&&(C=" "),(P>-1&&r+v.length>=0||C!==" ")&&v.push({type:"text",content:C})}}}),s},stringify:function(n){return n.reduce(function(e,t){return e+Ie("",t)},"")}};function q(){if(console&&console.warn){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];typeof e[0]=="string"&&(e[0]=`react-i18next:: ${e[0]}`),console.warn(...e)}}const pe={};function G(){for(var n=arguments.length,e=new Array(n),t=0;t<n;t++)e[t]=arguments[t];typeof e[0]=="string"&&pe[e[0]]||(typeof e[0]=="string"&&(pe[e[0]]=new Date),q(...e))}const Fe=(n,e)=>()=>{if(n.isInitialized)e();else{const t=()=>{setTimeout(()=>{n.off("initialized",t)},0),e()};n.on("initialized",t)}};function de(n,e,t){n.loadNamespaces(e,Fe(n,t))}function me(n,e,t,s){typeof t=="string"&&(t=[t]),t.forEach(i=>{n.options.ns.indexOf(i)<0&&n.options.ns.push(i)}),n.loadLanguages(e,Fe(n,s))}function _e(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const s=e.languages[0],i=e.options?e.options.fallbackLng:!1,r=e.languages[e.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=e.services.backendConnector.state[`${o}|${l}`];return u===-1||u===2};return t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&e.services.backendConnector.backend&&e.isLanguageChangingTo&&!a(e.isLanguageChangingTo,n)?!1:!!(e.hasResourceBundle(s,n)||!e.services.backendConnector.backend||e.options.resources&&!e.options.partialBundledLanguages||a(s,n)&&(!i||a(r,n)))}function et(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
1return!e.languages||!e.languages.length?(G("i18n.languages were undefined or empty",e.languages),!0):e.options.ignoreJSONStructure!==void 0?e.hasLoadedNamespace(n,{lng:t.lng,precheck:(i,r)=>{if(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!r(i.isLanguageChangingTo,n))return!1}}):_e(n,e,t)}const tt=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,st={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},nt=n=>st[n],it=n=>n.replace(tt,nt);let le={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:it};function rt(){let n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};le={...le,...n}}function Ae(){return le}let Te;function at(n){Te=n}function ce(){return Te}function ne(n,e){if(!n)return!1;const t=n.props?n.props.children:n.children;return e?t.length>0:!!t}function ie(n){if(!n)return[];const e=n.props?n.props.children:n.children;return n.props&&n.props.i18nIsDynamicList?K(e):e}function ot(n){return Object.prototype.toString.call(n)!=="[object Array]"?!1:n.every(e=>$.isValidElement(e))}function K(n){return Array.isArray(n)?n:[n]}function lt(n,e){const t={...e};return t.props=Object.assign(n.props,e.props),t}function je(n,e){if(!n)return"";let t="";const s=K(n),i=e.transSupportBasicHtmlNodes&&e.transKeepBasicHtmlNodesFor?e.transKeepBasicHtmlNodesFor:[];return s.forEach((r,a)=>{if(typeof r=="string")t+=`${r}`;else if($.isValidElement(r)){const o=Object.keys(r.props).length,l=i.indexOf(r.type)>-1,u=r.props.children;if(!u&&l&&o===0)t+=`<${r.type}/>`;else if(!u&&(!l||o!==0))t+=`<${a}></${a}>`;else if(r.props.i18nIsDynamicList)t+=`<${a}></${a}>`;else if(l&&o===1&&typeof u=="string")t+=`<${r.type}>${u}</${r.type}>`;else{const f=je(u,e);t+=`<${a}>${f}</${a}>`}}else if(r===null)q("Trans: the passed in value is invalid - seems you passed in a null child.");else if(typeof r=="object"){const{format:o,...l}=r,u=Object.keys(l);if(u.length===1){const f=o?`${u[0]}, ${o}`:u[0];t+=`{{${f}}}`}else q("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",r)}else q("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",r)}),t}function ut(n,e,t,s,i,r){if(e==="")return[];const a=s.transKeepBasicHtmlNodesFor||[],o=e&&new RegExp(a.map(m=>`<${m}`).join("|")).test(e);if(!n&&!o&&!r)return[e];const l={};function u(m){K(m).forEach(d=>{typeof d!="string"&&(ne(d)?u(ie(d)):typeof d=="object"&&!$.isValidElement(d)&&Object.assign(l,d))})}u(n);const f=Xe.parse(`<0>${e}</0>`),g={...l,...i};function c(m,S,d){const L=ie(m),y=x(L,S.children,d);return ot(L)&&y.length===0||m.props&&m.props.i18nIsDynamicList?L:y}function p(m,S,d,L,y){m.dummy?(m.children=S,d.push($.cloneElement(m,{key:L},y?void 0:S))):d.push(...$.Children.map([m],b=>{const h={...b.props};return delete h.i18nIsDynamicList,Z.createElement(b.type,oe({},h,{key:L,ref:b.ref},y?{}:{children:S}))}))}function x(m,S,d){const L=K(m);return K(S).reduce((b,h,O)=>{const P=h.children&&h.children[0]&&h.children[0].content&&t.services.interpolator.interpolate(h.children[0].content,g,t.language);if(h.type==="tag"){let C=L[parseInt(h.name,10)];d.length===1&&!C&&(C=d[0][h.name]),C||(C={});const k=Object.keys(h.attrs).length!==0?lt({props:h.attrs},C):C,I=$.isValidElement(k),A=I&&ne(h,!0)&&!h.voidElement,j=o&&typeof k=="object"&&k.dummy&&!I,T=typeof n=="object"&&n!==null&&Object.hasOwnProperty.call(n,h.name);if(typeof k=="string"){const N=t.services.interpolator.interpolate(k,g,t.language);b.push(N)}else if(ne(k)||A){const N=c(k,h,d);p(k,N,b,O)}else if(j){const N=x(L,h.children,d);p(k,N,b,O)}else if(Number.isNaN(parseFloat(h.name)))if(T){const N=c(k,h,d);p(k,N,b,O,h.voidElement)}else if(s.transSupportBasicHtmlNodes&&a.indexOf(h.name)>-1)if(h.voidElement)b.push($.createElement(h.name,{key:`${h.name}-${O}`}));else{const N=x(L,h.children,d);b.push($.createElement(h.name,{key:`${h.name}-${O}`},N))}else if(h.voidElement)b.push(`<${h.name} />`);else{const N=x(L,h.children,d);b.push(`<${h.name}>${N}</${h.name}>`)}else if(typeof k=="object"&&!I){const N=h.children[0]?P:null;N&&b.push(N)}else p(k,P,b,O,h.children.length!==1||!P)}else if(h.type==="text"){const C=s.transWrapTextNodes,k=r?s.unescape(t.services.interpolator.interpolate(h.content,g,t.language)):t.services.interpolator.interpolate(h.content,g,t.language);C?b.push($.createElement(C,{key:`${h.name}-${O}`},k)):b.push(k)}return b},[])}const v=x([{dummy:!0,children:n||[]}],f,K(n||[]));return ie(v[0])}function ct(n){let{children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:a={}
1,values:o,defaults:l,components:u,ns:f,i18n:g,t:c,shouldUnescape:p,...x}=n;const v=g||ce();if(!v)return G("You will need to pass in an i18next instance by using i18nextReactModule"),e;const m=c||v.t.bind(v)||(A=>A);r&&(a.context=r);const S={...Ae(),...v.options&&v.options.react};let d=f||m.ns||v.options&&v.options.defaultNS;d=typeof d=="string"?[d]:d||["translation"];const L=je(e,S),y=l||L||S.transEmptyNodeValue||i,{hashTransKey:b}=S,h=i||(b?b(L||y):L||y);v.options&&v.options.interpolation&&v.options.interpolation.defaultVariables&&(o=o&&Object.keys(o).length>0?{...o,...v.options.interpolation.defaultVariables}:{...v.options.interpolation.defaultVariables});const O=o?a.interpolation:{interpolation:{...a.interpolation,prefix:"#$?",suffix:"?$#"}},P={...a,count:t,...o,...O,defaultValue:y,ns:d},C=h?m(h,P):y;u&&Object.keys(u).forEach(A=>{const j=u[A];if(typeof j.type=="function"||!j.props||!j.props.children||C.indexOf(`${A}/>`)<0&&C.indexOf(`${A} />`)<0)return;function T(){return Z.createElement(Z.Fragment,null,j)}u[A]=Z.createElement(T,null)});const k=ut(u||e,C,v,S,P,p),I=s!==void 0?s:S.defaultTransParent;return I?$.createElement(I,x,k):k}const Xt={type:"3rdParty",init(n){rt(n.options.react),at(n)}},De=$.createContext();class ft{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function _t(n){let{children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:a={},values:o,defaults:l,components:u,ns:f,i18n:g,t:c,shouldUnescape:p,...x}=n;const{i18n:v,defaultNS:m}=$.useContext(De)||{},S=g||v||ce(),d=c||S&&S.t.bind(S);return ct({children:e,count:t,parent:s,i18nKey:i,context:r,tOptions:a,values:o,defaults:l,components:u,ns:f||d&&d.ns||m||S&&S.options&&S.options.defaultNS,i18n:S,t:c,shouldUnescape:p,...x})}const gt=(n,e)=>{const t=$.useRef();return $.useEffect(()=>{t.current=n},[n,e]),t.current};function es(n){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:t}=e,{i18n:s,defaultNS:i}=$.useContext(De)||{},r=t||s||ce();if(r&&!r.reportNamespaces&&(r.reportNamespaces=new ft),!r){G("You will need to pass in an i18next instance by using initReactI18next");const L=(b,h)=>typeof h=="string"?h:h&&typeof h=="object"&&typeof h.defaultValue=="string"?h.defaultValue:Array.isArray(b)?b[b.length-1]:b,y=[L,{},!1];return y.t=L,y.i18n={},y.ready=!1,y}r.options.react&&r.options.react.wait!==void 0&&G("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const a={...Ae(),...r.options.react,...e},{useSuspense:o,keyPrefix:l}=a;let u=i||r.options&&r.options.defaultNS;u=typeof u=="string"?[u]:u||["translation"],r.reportNamespaces.addUsedNamespaces&&r.reportNamespaces.addUsedNamespaces(u);const f=(r.isInitialized||r.initializedStoreOnce)&&u.every(L=>et(L,r,a));function g(){return r.getFixedT(e.lng||null,a.nsMode==="fallback"?u:u[0],l)}const[c,p]=$.useState(g);let x=u.join();e.lng&&(x=`${e.lng}${x}`);const v=gt(x),m=$.useRef(!0);$.useEffect(()=>{const{bindI18n:L,bindI18nStore:y}=a;m.current=!0,!f&&!o&&(e.lng?me(r,e.lng,u,()=>{m.current&&p(g)}):de(r,u,()=>{m.current&&p(g)})),f&&v&&v!==x&&m.current&&p(g);function b(){m.current&&p(g)}return L&&r&&r.on(L,b),y&&r&&r.store.on(y,b),()=>{m.current=!1,L&&r&&L.split(" ").forEach(h=>r.off(h,b)),y&&r&&y.split(" ").forEach(h=>r.store.off(h,b))}},[r,x]);const S=$.useRef(!0);$.useEffect(()=>{m.current&&!S.current&&p(g),S.current=!1},[r,l]);const d=[c,r,f];if(d.t=c,d.i18n=r,d.ready=f,f||!f&&!o)return d;throw new Promise(L=>{e.lng?me(r,e.lng,u,()=>L()):de(r,u,()=>L())})}const w=n=>typeof n=="string",H=()=>{let n,e;const t=new Promise((s,i)=>{n=s,e=i});return t.resolve=n,t.reject=e,t},ve=n=>n==null?"":""+n,ht=(n,e,t)=>{n.forEach(s=>{e[s]&&(t[s]=e[s])})},pt=/###/g,ye=n=>n&&n.indexOf("###")>-1?n.replace(pt,"."):n,xe=n=>!n||w(n),J=(n,e,t)=>{const s=w(e)?e.split("."):e;let i=0;for(;i<s.length-1;){if(xe(n))return{};const r=ye(s[i]);!n[r]&&t&&(n[r]=new t),Object.prototype.hasOwnProperty.call(n,r)?n=n[r]:n={},++i}return xe(n)?{}:{obj:n,k:ye(s[i])}},be=(n,e,t)=>{const{obj:s,k:i}=J(n,e,Object);if(s!==void 0||e.length===1){s[i]=t;return}let r=e[e.length-1],a=e.slice(0,e.length-1),o=J(n,a,Object);for(;o.obj===void 0&&a.length;)r=`${a[a.length-1]}.${r}`,a=a.slice(0,a.length-1),o=J(n,a,Object),o&&o.obj&&typeof o.obj[`${o.k}.${r}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${r}`]=t},dt=(n,e,t,s)=>{const{obj:i,k:r}=J(n,e,Object);i[r]=i[r]||[],i[r].push(t)},X=(n,e)=>{const{obj:t,k:s}=J(n,e);if(t)return t[s]},mt=(n,e,t)=>{const s=X(n,t);return s!==void 0?s:X(e,t)},Ue=(n,e,t)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in n?w(n[s])||n[s]instanceof String||w(e[s])||e[s]instanceof String?t&&(n[s]=e[s]):Ue(n[s],e[s],t):n[s]=e[s]);return n},U=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var vt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const yt=n=>w(n)?n.replace(/[&<>
1"'\/]/g,e=>vt[e]):n;class xt{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const bt=[" ",",","?","!",";"],St=new xt(20),wt=(n,e,t)=>{e=e||"",t=t||"";const s=bt.filter(a=>e.indexOf(a)<0&&t.indexOf(a)<0);if(s.length===0)return!0;const i=St.getRegExp(`(${s.map(a=>a==="?"?"\\?":a).join("|")})`);let r=!i.test(n);if(!r){const a=n.indexOf(t);a>0&&!i.test(n.substring(0,a))&&(r=!0)}return r},ue=function(n,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!n)return;if(n[e])return n[e];const s=e.split(t);let i=n;for(let r=0;r<s.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=r;l<s.length;++l)if(l!==r&&(o+=t),o+=s[l],a=i[o],a!==void 0){if(["string","number","boolean"].indexOf(typeof a)>-1&&l<s.length-1)continue;r+=l-r+1;break}i=a}return i},_=n=>n&&n.replace("_","-"),Lt={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,e){console&&console[n]&&console[n].apply(console,e)}};class ee{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||Lt,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,s,i){return i&&!this.debug?null:(w(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ee(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ee(this.logger,e)}}var F=new ee;class se{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(t)||0;this.observers[s].set(t,i+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}emit(e){for(var t=arguments.length,s=new Array(t>1?t-1:0),i=1;i<t;i++)s[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o(...s)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(a=>{let[o,l]=a;for(let u=0;u<l;u++)o.apply(o,[e,...s])})}}class Se extends se{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){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.indexOf(".")>-1?o=e.split("."):(o=[e,t],s&&(Array.isArray(s)?o.push(...s):w(s)&&r?o.push(...s.split(r)):o.push(s)));const l=X(this.data,o);return!l&&!t&&!s&&e.indexOf(".")>-1&&(e=o[0],t=o[1],s=o.slice(2).join(".")),l||!a||!w(s)?l:ue(this.data&&this.data[e]&&this.data[e][t],s,r)}addResource(e,t,s,i){let r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const a=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let o=[e,t];
vendor: 1,642 bytes, line 1
1s&&(o=o.concat(a?s.split(a):s)),e.indexOf(".")>-1&&(o=e.split("."),i=t,t=o[1]),this.addNamespaces(t),be(this.data,o,i),r.silent||this.emit("added",e,t,s,i)}addResources(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const r in s)(w(s[r])||Array.isArray(s[r]))&&this.addResource(e,t,r,s[r],{silent:!0});i.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,i,r){let a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},o=[e,t];e.indexOf(".")>-1&&(o=e.split("."),i=s,s=t,t=o[1]),this.addNamespaces(t);let l=X(this.data,o)||{};a.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?Ue(l,s,r):l={...l,...s},be(this.data,o,l),a.silent||this.emit("added",e,t,s)}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||(t=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(e,t)}:this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}}var Ve={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,e,t,s,i){return n.forEach(r=>{this.processors[r]&&(e=this.processors[r].process(e,t,s,i))}),e}};const we={};class te extends se{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),ht(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
1i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=F.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;const s=this.resolve(e,t);return s&&s.res!==void 0}extractFromKey(e,t){let s=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let r=t.ns||this.options.defaultNS||[];const a=s&&e.indexOf(s)>-1,o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!wt(e,s,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:w(r)?[r]:r};const u=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(u[0])>-1)&&(r=u.shift()),e=u.join(i)}return{key:e,namespaces:w(r)?[r]:r}}translate(e,t,s){if(typeof t!="object"&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),typeof t=="object"&&(t={...t}),t||(t={}),e==null)return"";Array.isArray(e)||(e=[String(e)]);const i=t.returnDetails!==void 0?t.returnDetails:this.options.returnDetails,r=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:a,namespaces:o}=this.extractFromKey(e[e.length-1],t),l=o[o.length-1],u=t.lng||this.language,f=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(u&&u.toLowerCase()==="cimode"){if(f){const y=t.nsSeparator||this.options.nsSeparator;return i?{res:`${l}${y}${a}`,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:`${l}${y}${a}`}return i?{res:a,usedKey:a,exactUsedKey:a,usedLng:u,usedNS:l,usedParams:this.getUsedParamsDetails(t)}:a}const g=this.resolve(e,t);let c=g&&g.res;const p=g&&g.usedKey||a,x=g&&g.exactUsedKey||a,v=Object.prototype.toString.apply(c),m=["[object Number]","[object Function]","[object RegExp]"],S=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,d=!this.i18nFormat||this.i18nFormat.handleAsObject,L=!w(c)&&typeof c!="boolean"&&typeof c!="number";if(d&&c&&L&&m.indexOf(v)<0&&!(w(S)&&Array.isArray(c))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const y=this.options.returnedObjectHandler?this.options.returnedObjectHandler(p,c,{...t,ns:o}):`key '${a} (${this.language})' returned an object instead of string.`;return i?(g.res=y,g.usedParams=this.getUsedParamsDetails(t),g):y}if(r){const y=Array.isArray(c),b=y?[]:{},h=y?x:p;for(const O in c)if(Object.prototype.hasOwnProperty.call(c,O)){const P=`${h}${r}${O}`;b[O]=this.translate(P,{...t,joinArrays:!1,ns:o}),b[O]===P&&(b[O]=c[O])}c=b}}else if(d&&w(S)&&Array.isArray(c))c=c.join(S),c&&(c=this.extendTranslation(c,e,t,s));else{let y=!1,b=!1;const h=t.count!==void 0&&!w(t.count),O=te.hasDefaultValue(t),P=h?this.pluralResolver.getSuffix(u,t.count,t):"",C=t.ordinal&&h?this.pluralResolver.getSuffix(u,t.count,{ordinal:!1}):"",k=h&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),I=k&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${P}`]||t[`defaultValue${C}`]||t.defaultValue;!this.isValidLookup(c)&&O&&(y=!0,c=I),this.isValidLookup(c)||(b=!0,c=a);const j=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&b?void 0:c,T=O&&I!==c&&this.options.updateMissing;if(b||y||T){if(this.logger.log(T?"updateKey":"missingKey",u,l,a,T?I:c),r){const E=this.resolve(a,{...t,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 N=[];const Q=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Q&&Q[0])for(let E=0;E<Q.length;E++)N.push(Q[E]);else this.options.saveMissingTo==="all"?N=this.languageUtils.toResolveHierarchy(t.lng||this.language):N.push(t.lng||this.language);const fe=(E,D,M)=>{const ge=O&&M!==c?M:j;this.options.missingKeyHandler?this.options.missingKeyHandler(E,l,D,ge,T,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(E,l,D,ge,T,t),this.emit
vendor: 11,989 bytes, line 1
1("missingKey",E,l,D,c)};this.options.saveMissing&&(this.options.saveMissingPlurals&&h?N.forEach(E=>{const D=this.pluralResolver.getSuffixes(E,t);k&&t[`defaultValue${this.options.pluralSeparator}zero`]&&D.indexOf(`${this.options.pluralSeparator}zero`)<0&&D.push(`${this.options.pluralSeparator}zero`),D.forEach(M=>{fe([E],a+M,t[`defaultValue${M}`]||I)})}):fe(N,a,I))}c=this.extendTranslation(c,e,t,g,s),b&&c===a&&this.options.appendNamespaceToMissingKey&&(c=`${l}:${a}`),(b||y)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?c=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}:${a}`:a,y?c:void 0):c=this.options.parseMissingKeyHandler(c))}return i?(g.res=c,g.usedParams=this.getUsedParamsDetails(t),g):c}extendTranslation(e,t,s,i,r){var a=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const u=w(e)&&(s&&s.interpolation&&s.interpolation.skipOnVariables!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(u){const c=e.match(this.interpolator.nestingRegexp);f=c&&c.length}let g=s.replace&&!w(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(g={...this.options.interpolation.defaultVariables,...g}),e=this.interpolator.interpolate(e,g,s.lng||this.language||i.usedLng,s),u){const c=e.match(this.interpolator.nestingRegexp),p=c&&c.length;f<p&&(s.nest=!1)}!s.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(s.lng=this.language||i.usedLng),s.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var c=arguments.length,p=new Array(c),x=0;x<c;x++)p[x]=arguments[x];return r&&r[0]===p[0]&&!s.context?(a.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`),null):a.translate(...p,t)},s)),s.interpolation&&this.interpolator.reset()}const o=s.postProcess||this.options.postProcess,l=w(o)?[o]:o;return e!=null&&l&&l.length&&s.applyPostProcessor!==!1&&(e=Ve.handle(l,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,i,r,a,o;return w(e)&&(e=[e]),e.forEach(l=>{if(this.isValidLookup(s))return;const u=this.extractFromKey(l,t),f=u.key;i=f;let g=u.namespaces;this.options.fallbackNS&&(g=g.concat(this.options.fallbackNS));const c=t.count!==void 0&&!w(t.count),p=c&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),x=t.context!==void 0&&(w(t.context)||typeof t.context=="number")&&t.context!=="",v=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);g.forEach(m=>{this.isValidLookup(s)||(o=m,!we[`${v[0]}-${m}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(o)&&(we[`${v[0]}-${m}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" 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!!!")),v.forEach(S=>{if(this.isValidLookup(s))return;a=S;const d=[f];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(d,f,S,m,t);else{let y;c&&(y=this.pluralResolver.getSuffix(S,t.count,t));const b=`${this.options.pluralSeparator}zero`,h=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(d.push(f+y),t.ordinal&&y.indexOf(h)===0&&d.push(f+y.replace(h,this.options.pluralSeparator)),p&&d.push(f+b)),x){const O=`${f}${this.options.contextSeparator}${t.context}`;d.push(O),c&&(d.push(O+y),t.ordinal&&y.indexOf(h)===0&&d.push(O+y.replace(h,this.options.pluralSeparator)),p&&d.push(O+b))}}let L;for(;L=d.pop();)this.isValidLookup(s)||(r=L,s=this.getResource(S,m,L,t))}))})}),{res:s,usedKey:i,exactUsedKey:r,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,s,i):this.resourceStore.getResource(e,t,s,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"],s=e.replace&&!w(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const r of t)delete i[r]}return i}static hasDefaultValue(e){const t="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&t===s.substring(0,t.length)&&e[s]!==void 0)return!0;return!1}}const re=n=>n.charAt(0).toUpperCase()+n.slice(1);class Le{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=F.create("languageUtils")}getScriptPartFromCode(e){if(e=_(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=_(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(w(e)&&e.indexOf("-")>-1){if(typeof Intl<"u"&&typeof Intl.getCanonicalLocales<"u")try{let i=Intl.getCanonicalLocales(e)[0];if(i&&this.options.lowerCaseLng&&(i=i.toLowerCase()),i)return i}catch{}const t=["hans","hant","latn","cyrl","cans","mong","arab"];let s=e.split("-");return this.options.lowerCaseLng?s=s.map(i=>i.toLowerCase()):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=re(s[1].toLowerCase()))):s.length===3&&(s[0]=s[0].toLowerCase(),s[1].length===2&&(s[1]=s[1].toUpperCase()),s[0]!=="sgn"&&s[2].length===2&&(s[2]=s[2].toUpperCase()),t.indexOf(s[1].toLowerCase())>-1&&(s[1]=re(s[1].toLowerCase())),t.indexOf(s[2].toLowerCase())>-1&&(s[2]=re(s[2].toLowerCase()))),s.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(s=>{if(t)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const i=this.getLanguagePartFromCode(s);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(r=>{if(r===i)return r;if(!(r.indexOf("-")<0&&i.indexOf("-")<0)&&(r.indexOf("-")>0&&i.indexOf("-")<0&&r.substring(0,r.indexOf("-"))===i||r.indexOf(i)===0&&i.length>1))return r})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),w(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],r=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return w(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&r(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&r(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&r(this.getLanguagePartFromCode(e))):w(e)&&r(this.formatLanguageCode(e)),s.forEach(a=>{i.indexOf(a)<0&&r(this.formatLanguageCode(a))}),i}}let Ot=[{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}],kt={1:n=>+(n>1),2:n=>+(n!=1),3:n=>0,4:n=>n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,5:n=>n==0?0:n==1?1:n==2?2:n%100>=3&&n%100<=10?3:n%100>=11?4:5,6:n=>n==1?0:n>=2&&n<=4?1:2,7:n=>n==1?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2,8:n=>n==1?0:n==2?1:n!=8&&n!=11?2:3,9:n=>+(n>=2),10:n=>n==1?0:n==2?1:n<7?2:n<11?3:4,11:n=>n==1||n==11?0:n==2||n==12?1:n>2&&n<20?2:3,12:n=>+(n%10!=1||n%100==11),13:n=>+(n!==0),14:n=>n==1?0:n==2?1:n==3?2:3,15:n=>n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?1:2,16:n=>n%10==1&&n%100!=11?0:n!==0?1:2,17:n=>n==1||n%10==1&&n%100!=11?0:1,18:n=>n==0?0:n==1?1:2,19:n=>n==1?0:n==0||n%100>1&&n%100<11?1:n%100>10&&n%100<20?2:3,20:n=>n==1?0:n==0||n%100>0&&n%100<20?1:2,21:n=>n%100==1?1:n%100==2?2:n%100==3||n%100==4?3:0,22:n=>n==1?0:n==2?1:(n<0||n>10)&&n%10==0?2:3};const Ct=["v1","v2","v3"],Nt=["v4"],Oe={zero:0,one:1,two:2,few:3,many:4,other:5},$t=()=>{const n={};return Ot.forEach(e=>{e.lngs.forEach(t=>{n[t]={numbers:e.nr,plurals:kt[e.fc]}})}),n};class Pt{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=F.create("pluralResolver"),(!this.options.compatibilityJSON||Nt.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=$t(),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()){const s=_(e==="dev"?"en":e),i=t.ordinal?"ordinal":"cardinal",r=JSON.stringify({cleanedCode:s,type:i});if(r in this.pluralRulesCache)return this.pluralRulesCache[r];let a;try{a=new Intl.PluralRules(s,{type:i})}catch{if(!e.match(/-|_/))return;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,t)}return this.pluralRulesCache[r]=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]:{};const s=this.getRule(e,t);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}getPluralFormsOfKey(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};
vendor: 1,299 bytes, line 1
1return this.getSuffixes(e,s).map(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=this.getRule(e,t);return s?this.shouldUseIntlApi()?s.resolvedOptions().pluralCategories.sort((i,r)=>Oe[i]-Oe[r]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):s.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,s);return i?this.shouldUseIntlApi()?`${this.options.prepend}${s.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 s=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[s];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const r=()=>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()}`:r():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?r():this.options.prepend&&s.toString()?this.options.prepend+s.toString():s.toString()}
vendor: 20,595 bytes, line 1
1shouldUseIntlApi(){return!Ct.includes(this.options.compatibilityJSON)}}const ke=function(n,e,t){let s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,r=mt(n,e,t);return!r&&i&&w(t)&&(r=ue(n,t,s),r===void 0&&(r=ue(e,t,s))),r},ae=n=>n.replace(/\$/g,"$$$$");class Rt{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=F.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:s,useRawValueToEscape:i,prefix:r,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:u,unescapeSuffix:f,unescapePrefix:g,nestingPrefix:c,nestingPrefixEscaped:p,nestingSuffix:x,nestingSuffixEscaped:v,nestingOptionsSeparator:m,maxReplaces:S,alwaysFormat:d}=e.interpolation;this.escape=t!==void 0?t:yt,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=r?U(r):a||"{{",this.suffix=o?U(o):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=f?"":g||"-",this.unescapeSuffix=this.unescapePrefix?"":f||"",this.nestingPrefix=c?U(c):p||U("$t("),this.nestingSuffix=x?U(x):v||U(")"),this.nestingOptionsSeparator=m||",",this.maxReplaces=S||1e3,this.alwaysFormat=d!==void 0?d:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,s)=>t&&t.source===s?(t.lastIndex=0,t):new RegExp(s,"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,s,i){let r,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=p=>{if(p.indexOf(this.formatSeparator)<0){const S=ke(t,l,p,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(S,void 0,s,{...i,...t,interpolationkey:p}):S}const x=p.split(this.formatSeparator),v=x.shift().trim(),m=x.join(this.formatSeparator).trim();return this.format(ke(t,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),m,s,{...i,...t,interpolationkey:v})};this.resetRegExp();const f=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,g=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:p=>ae(p)},{regex:this.regexp,safeValue:p=>this.escapeValue?ae(this.escape(p)):ae(p)}].forEach(p=>{for(o=0;r=p.regex.exec(e);){const x=r[1].trim();if(a=u(x),a===void 0)if(typeof f=="function"){const m=f(e,r,i);a=w(m)?m:""}else if(i&&Object.prototype.hasOwnProperty.call(i,x))a="";else if(g){a=r[0];continue}else this.logger.warn(`missed to pass in variable ${x} for interpolating ${e}`),a="";else!w(a)&&!this.useRawValueToEscape&&(a=ve(a));const v=p.safeValue(a);if(e=e.replace(r[0],v),g?(p.regex.lastIndex+=a.length,p.regex.lastIndex-=r[0].length):p.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,r,a;const o=(l,u)=>{const f=this.nestingOptionsSeparator;if(l.indexOf(f)<0)return l;const g=l.split(new RegExp(`${f}[ ]*{`));let c=`{${g[1]}`;l=g[0],c=this.interpolate(c,a);const p=c.match(/'/g),x=c.match(/"/g);(p&&p.length%2===0&&!x||x.length%2!==0)&&(c=c.replace(/'/g,'"'));try{a=JSON.parse(c),u&&(a={...u,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${f}${c}`}return a.defaultValue&&a.defaultValue.indexOf(this.prefix)>-1&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...s},a=a.replace&&!w(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let u=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const f=i[1].split(this.formatSeparator).map(g=>g.trim());i[1]=f.shift(),l=f,u=!0}if(r=t(o.call(this,i[1].trim(),a),a),r&&i[0]===e&&!w(r))return r;w(r)||(r=ve(r)),r||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),r=""),u&&(r=l.reduce((f,g)=>this.format(f,g,s.lng,{...s,interpolationkey:i[1].trim()}),r.trim())),e=e.replace(i[0],r),this.regexp.lastIndex=0}return e}}const Et=n=>{let e=n.toLowerCase().trim();const t={};if(n.indexOf("(")>-1){const s=n.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[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[o,...l]=a.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),f=o.trim();t[f]||(t[f]=u),u==="false"&&(t[f]=!1),u==="true"&&(t[f]=!0),isNaN(u)||(t[f]=parseInt(u,10))}})}return{formatName:e,formatOptions:t}},V=n=>{const e={};return(t,s,i)=>{let r=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(r={...r,[i.interpolationkey]:void 0});const a=s+JSON.stringify(r);let o=e[a];return o||(o=n(_(s),i),e[a]=o),o(t)}};class It{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=F.create("formatter"),this.options=e,this.formats={number:V((t,s)=>{const i=new Intl.NumberFormat(t,{...s});return r=>i.format(r)}),currency:V((t,s)=>{const i=new Intl.NumberFormat(t,{...s,style:"currency"});return r=>i.format(r)}),datetime:V((t,s)=>{const i=new Intl.DateTimeFormat(t,{...s});return r=>i.format(r)}),relativetime:V((t,s)=>{const i=new Intl.RelativeTimeFormat(t,{...s});return r=>i.format(r,s.range||"day")}),list:V((t,s)=>{const i=new Intl.ListFormat(t,{...s});return r=>i.format(r)})},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()]=V(t)}format(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const r=t.split(this.formatSeparator);if(r.length>1&&r[0].indexOf("(")>1&&r[0].indexOf(")")<0&&r.find(o=>o.indexOf(")")>-1)){const o=r.findIndex(l=>l.indexOf(")")>-1);r[0]=[r[0],...r.splice(1,o)].join(this.formatSeparator)}return r.reduce((o,l)=>{const{formatName:u,formatOptions:f}=Et(l);if(this.formats[u]){let g=o;try{const c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},p=c.locale||c.lng||i.locale||i.lng||s;g=this.formats[u](o,p,{...f,...i,...c})}catch(c){this.logger.warn(c)}return g}else this.logger.warn(`there was no format function for ${u}`);return o},e)}}const Ft=(n,e)=>{n.pending[e]!==void 0&&(delete n.pending[e],n.pendingCount--)};class At extends se{constructor(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=F.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(s,i.backend,i)}queueLoad(e,t,s,i){const r={},a={},o={},l={};return e.forEach(u=>{let f=!0;t.forEach(g=>{const c=`${u}|${g}`;!s.reload&&this.store.hasResourceBundle(u,g)?this.state[c]=2:this.state[c]<0||(this.state[c]===1?a[c]===void 0&&(a[c]=!0):(this.state[c]=1,f=!1,a[c]===void 0&&(a[c]=!0),r[c]===void 0&&(r[c]=!0),l[g]===void 0&&(l[g]=!0)))}),f||(o[u]=!0)}),(Object.keys(r).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(r),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,t,s){const i=e.split("|"),r=i[0],a=i[1];t&&this.emit("failedLoading",r,a,t),!t&&s&&this.store.addResourceBundle(r,a,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const o={};this.queue.forEach(l=>{dt(l.loaded,[r],a),Ft(l,e),t&&l.errors.push(t),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{o[u]||(o[u]={});const f=l.loaded[u];f.length&&f.forEach(g=>{o[u][g]===void 0&&(o[u][g]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,t,s){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=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:s,tried:i,wait:r,callback:a});return}this.readingCalls++;const o=(u,f)=>{if(this.readingCalls--,this.waitingReads.length>0){const g=this.waitingReads.shift();this.read(g.lng,g.ns,g.fcName,g.tried,g.wait,g.callback)}if(u&&f&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,s,i+1,r*2,a)},r);return}a(u,f)},l=this.backend[s].bind(this.backend);if(l.length===2){try{const u=l(e,t);u&&typeof u.then=="function"?u.then(f=>o(null,f)).catch(o):o(null,u)}catch(u){o(u)}return}return l(e,t,o)}prepareLoading(e,t){let s=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();w(e)&&(e=this.languageUtils.toResolveHierarchy(e)),w(t)&&(t=[t]);const r=this.queueLoad(e,t,s,i);if(!r.toLoad.length)return r.pending.length||i(),null;r.toLoad.forEach(a=>{this.loadOne(a)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const s=e.split("|"),i=s[0],r=s[1];this.read(i,r,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`,a),!a&&o&&this.logger.log(`${t}loaded namespace ${r} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,t,s,i,r){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 "${s}" 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(!(s==null||s==="")){if(this.backend&&this.backend.create){const l={...a,isUpdate:r},u=this.backend.create.bind(this.backend);if(u.length<6)try{let f;u.length===5?f=u(e,t,s,i,l):f=u(e,t,s,i),f&&typeof f.then=="function"?f.then(g=>o(null,g)).catch(o):o(null,f)}catch(f){o(f)}else u(e,t,s,i,o,l)}!e||!e[0]||this.store.addResource(e[0],t,s,i)}}}const Ce=()=>({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:n=>{let e={};if(typeof n[1]=="object"&&(e=n[1]),w(n[1])&&(e.defaultValue=n[1]),w(n[2])&&(e.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const t=n[3]||n[2];Object.keys(t).forEach(s=>{e[s]=t[s]})}return e},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}),Ne=n=>(w(n.ns)&&(n.ns=[n.ns]),w(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),w(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs&&n.supportedLngs.indexOf("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),n),Y=()=>{},Tt=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(t=>{typeof n[t]=="function"&&(n[t]=n[t].bind(n))})};class W extends se{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=Ne(e),this.services={},this.logger=F,this.modules={external:[]},Tt(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initImmediate)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(){var e=this;let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(w(t.ns)?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=Ce();this.options={...i,...this.options,...Ne(t)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator);const r=f=>f?typeof f=="function"?new f:f:null;if(!this.options.isClone){this.modules.logger?F.init(r(this.modules.logger),this.options):F.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:typeof Intl<"u"&&(f=It);const g=new Le(this.options);this.store=new Se(this.options.resources,this.options);const c=this.services;c.logger=F,c.resourceStore=this.store,c.languageUtils=g,c.pluralResolver=new Pt(g,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),f&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(c.formatter=r(f),c.formatter.init(c,this.options),this.options.interpolation.format=c.formatter.format.bind(c.formatter)),c.interpolator=new Rt(this.options),c.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},c.backendConnector=new At(r(this.modules.backend),c.resourceStore,c,this.options),c.backendConnector.on("*",function(p){for(var x=arguments.length,v=new Array(x>1?x-1:0),m=1;m<x;m++)v[m-1]=arguments[m];e.emit(p,...v)}),this.modules.languageDetector&&(c.languageDetector=r(this.modules.languageDetector),c.languageDetector.init&&c.languageDetector.init(c,this.options.detection,this.options)),this.modules.i18nFormat&&(c.i18nFormat=r(this.modules.i18nFormat),c.i18nFormat.init&&c.i18nFormat.init(this)),this.translator=new te(this.services,this.options),this.translator.on("*",function(p){for(var x=arguments.length,v=new Array(x>1?x-1:0),m=1;m<x;m++)v[m-1]=arguments[m];e.emit(p,...v)}),this.modules.external.forEach(p=>{p.init&&p.init(this)})}if(this.format=this.options.interpolation.format,s||(s=Y),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[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(f=>{this[f]=function(){return e.store[f](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=function(){return e.store[f](...arguments),e}});const l=H(),u=()=>{const f=(g,c)=>{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),l.resolve(c),s(g,c)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)};return this.options.resources||!this.options.initImmediate?u():setTimeout(u,0),l}loadResources(e){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y;const i=w(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const r=[],a=o=>{if(!o||o==="cimode")return;this.services.languageUtils.toResolveHierarchy(o).forEach(u=>{u!=="cimode"&&r.indexOf(u)<0&&r.push(u)})};i?a(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(l=>a(l)),this.options.preload&&this.options.preload.forEach(o=>a(o)),this.services.backendConnector.load(r,this.options.ns,o=>{!o&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(o)})}else s(null)}reloadResources(e,t,s){const i=H();return typeof e=="function"&&(s=e,e=void 0),typeof t=="function"&&(s=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),s||(s=Y),this.services.backendConnector.reload(e,t,r=>{i.resolve(),s(r)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new 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"&&Ve.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 t=0;t<this.languages.length;t++){const s=this.languages[t];if(!(["cimode","dev"].indexOf(s)>-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}}changeLanguage(e,t){var s=this;this.isLanguageChangingTo=e;const i=H();this.emit("languageChanging",e);const r=l=>{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},a=(l,u)=>{u?(r(u),this.translator.changeLanguage(u),this.isLanguageChangingTo=void 0,this.emit("languageChanged",u),this.logger.log("languageChanged",u)):this.isLanguageChangingTo=void 0,i.resolve(function(){return s.t(...arguments)}),t&&t(l,function(){return s.t(...arguments)})},o=l=>{!e&&!l&&this.services.languageDetector&&(l=[]);const u=w(l)?l:this.services.languageUtils.getBestMatchFromCodes(l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),i}getFixedT(e,t,s){var i=this;const r=function(a,o){let l;if(typeof o!="object"){for(var u=arguments.length,f=new Array(u>2?u-2:0),g=2;g<u;g++)f[g-2]=arguments[g];l=i.options.overloadTranslationOptionHandler([a,o].concat(f))}else l={...o};l.lng=l.lng||r.lng,l.lngs=l.lngs||r.lngs,l.ns=l.ns||r.ns,l.keyPrefix!==""&&(l.keyPrefix=l.keyPrefix||s||r.keyPrefix);const c=i.options.keySeparator||".";let p;return l.keyPrefix&&Array.isArray(a)?p=a.map(x=>`${l.keyPrefix}${c}${x}`):p=l.keyPrefix?`${l.keyPrefix}${c}${a}`:a,i.t(p,l)};return w(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=s,r}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;
1if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,r=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const u=this.services.backendConnector.state[`${o}|${l}`];return u===-1||u===0||u===2};if(t.precheck){const o=t.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(s,e)&&(!i||a(r,e)))}loadNamespaces(e,t){const s=H();return this.options.ns?(w(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),t&&t(i)}),s):(t&&t(),Promise.resolve())}loadLanguages(e,t){const s=H();w(e)&&(e=[e]);const i=this.options.preload||[],r=e.filter(a=>i.indexOf(a)<0&&this.services.languageUtils.isSupportedCode(a));return r.length?(this.options.preload=i.concat(r),this.loadResources(a=>{s.resolve(),t&&t(a)}),s):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";const 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"],s=this.services&&this.services.languageUtils||new Le(Ce());return t.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new W(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Y;const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},r=new W(i);return(e.debug!==void 0||e.prefix!==void 0)&&(r.logger=r.logger.clone(e)),["store","services","language"].forEach(o=>{r[o]=this[o]}),r.services={...this.services},r.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},s&&(r.store=new Se(this.store.data,i),r.services.resourceStore=r.store),r.translator=new te(r.services,i),r.translator.on("*",function(o){for(var l=arguments.length,u=new Array(l>1?l-1:0),f=1;f<l;f++)u[f-1]=arguments[f];r.emit(o,...u)}),r.init(i,t),r.translator.options=i,r.translator.backendConnector.services.utils={hasLoadedNamespace:r.hasLoadedNamespace.bind(r)},r}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const R=W.createInstance();R.createInstance=W.createInstance;R.createInstance;R.dir;R.init;R.loadResources;R.reloadResources;R.use;R.changeLanguage;R.getFixedT;R.t;R.exists;R.setDefaultNamespace;R.hasLoadedNamespace;R.loadNamespaces;R.loadLanguages;var Ke=[],jt=Ke.forEach,Dt=Ke.slice;function Ut(n){return jt.call(Dt.call(arguments,1),function(e){if(e)for(var t in e)n[t]===void 0&&(n[t]=e[t])}),n}var $e=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Vt=function(e,t,s){var i=s||{};i.path=i.path||"/";var r=encodeURIComponent(t),a="".concat(e,"=").concat(r);if(i.maxAge>0){var o=i.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");a+="; Max-Age=".concat(Math.floor(o))}if(i.domain){if(!$e.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain=".concat(i.domain)}if(i.path){if(!$e.test(i.path))throw new TypeError("option path is invalid");a+="; Path=".concat(i.path)}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invali
1d");a+="; Expires=".concat(i.expires.toUTCString())}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var l=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(l){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return a},Pe={create:function(e,t,s,i){var r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(r.expires=new Date,r.expires.setTime(r.expires.getTime()+s*60*1e3)),i&&(r.domain=i),document.cookie=Vt(e,encodeURIComponent(t),r)},read:function(e){for(var t="".concat(e,"="),s=document.cookie.split(";"),i=0;i<s.length;i++){for(var r=s[i];r.charAt(0)===" ";)r=r.substring(1,r.length);if(r.indexOf(t)===0)return r.substring(t.length,r.length)}return null},remove:function(e){this.create(e,"",-1)}},Kt={name:"cookie",lookup:function(e){var t;if(e.lookupCookie&&typeof document<"u"){var s=Pe.read(e.lookupCookie);s&&(t=s)}return t},cacheUserLanguage:function(e,t){t.lookupCookie&&typeof document<"u"&&Pe.create(t.lookupCookie,e,t.cookieMinutes,t.cookieDomain,t.cookieOptions)}},Mt={name:"querystring",lookup:function(e){var t;if(typeof window<"u"){var s=window.location.search;!window.location.search&&window.location.hash&&window.location.hash.indexOf("?")>-1&&(s=window.location.hash.substring(window.location.hash.indexOf("?")));for(var i=s.substring(1),r=i.split("&"),a=0;a<r.length;a++){var o=r[a].indexOf("=");if(o>0){var l=r[a].substring(0,o);l===e.lookupQuerystring&&(t=r[a].substring(o+1))}}}return t}},z=null,Re=function(){if(z!==null)return z;try{z=window!=="undefined"&&window.localStorage!==null;var e="i18next.translate.boo";window.localStorage.setItem(e,"foo"),window.localStorage.removeItem(e)}catch{z=!1}return z},Ht={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Re()){var s=window.localStorage.getItem(e.lookupLocalStorage);s&&(t=s)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Re()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},B=null,Ee=function(){if(B!==null)return B;try{B=window!=="undefined"&&window.sessionStorage!==null;var e="i18next.translate.boo";window.sessionStorage.setItem(e,"foo"),window.sessionStorage.removeItem(e)}catch{B=!1}return B},zt={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Ee()){var s=window.sessionStorage.getItem(e.lookupSessionStorage);s&&(t=s)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Ee()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Bt={name:"navigator",lookup:function(e){var t=[];if(typeof navigator<"u"){if(navigator.languages)for(var s=0;s<navigator.languages.length;s++)t.push(navigator.languages[s]);navigator.userLanguage&&t.push(navigator.userLanguage),navigator.language&&t.push(navigator.language)}return t.length>0?t:void 0}},Jt={name:"htmlTag",lookup:function(e){var t,s=e.htmlTag||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(t=s.getAttribute("lang")),t}},Wt={name:"path",lookup:function(e){var t;if(typeof window<"u"){var s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(s instanceof Array)if(typeof e.lookupFromPathIndex=="number"){if(typeof s[e.lookupFromPathIndex]!="string")return;t=s[e.lookupFromPathIndex].replace("/","")}else t=s[0].replace("/","")}return t}},Qt={name:"subdomain",lookup:function(e){var t=typeof e.lookupFromSubdomainIndex=="number"?e.lookupFromSubdomainIndex+1:1,s=typeof window<"u"&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(s)return s[t]}},Me=!1;try{document.cookie,Me=!0}catch{}var He=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];Me||He.splice(1,1);function Yt(){return{order:He,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:function(e){return e}}}var Zt=function(){function n(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Je(this,n),this.type="languageDetector",this.detectors={},this.init(e,t)}return Be(n,[{key:"init",value:function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=Ut(s,this.options||{},Yt()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=function(r){return r.replace("-","_")}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=i,this.addDetector(Kt),this.addDetector(Mt),this.addDetector(Ht),this.addDetector(zt),this.addDetector(Bt),this.addDetector(Jt),this.addDetector(Wt),this.addDetector(Qt)}},{key:"addDetector",value:function(t){return this.detectors[t.name]=t,this}},{key:"detect",value:function(t){var s=this;t||(t=this.options.order);var i=[];return t.forEach(function(r){if(s.detectors[r]){var a=s.detectors[r].lookup(s.options);
vendor: 532 bytes, line 1
1a&&typeof a=="string"&&(a=[a]),a&&(i=i.concat(a))}}),i=i.map(function(r){return s.options.convertDetectedLanguage(r)}),this.services.languageUtils.getBestMatchFromCodes?i:i.length>0?i[0]:null}},{key:"cacheUserLanguage",value:function(t,s){var i=this;s||(s=this.options.caches),s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||s.forEach(function(r){i.detectors[r]&&i.detectors[r].cacheUserLanguage(t,i.options)}))}}])}();Zt.type="languageDetector";export{Zt as B,_t as T,oe as _,Xt as a,R as i,es as u};

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.