PHP-Course/exam/dist/assets/vendor-CKNY8FYg.js
2024-07-26 01:47:15 +02:00

27 lines
87 KiB
JavaScript

import{r as yt}from"./vendor_react-CEGsRJaz.js";function _t(r,e){for(var t=0;t<e.length;t++){const n=e[t];if(typeof n!="string"&&!Array.isArray(n)){for(const i in n)if(i!=="default"&&!(i in r)){const s=Object.getOwnPropertyDescriptor(n,i);s&&Object.defineProperty(r,i,s.get?s:{enumerable:!0,get:()=>n[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}var ae=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ut(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function xr(r){if(r.__esModule)return r;var e=r.default;if(typeof e=="function"){var t=function n(){return this instanceof n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(r).forEach(function(n){var i=Object.getOwnPropertyDescriptor(r,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return r[n]}})}),t}var Mt="Invariant failed";function Sr(r,e){if(!r)throw new Error(Mt)}function Or(r,e){}var bt={exports:{}},vt={},wt={exports:{}},xt={};/**
* @license React
* use-sync-external-store-shim.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var ee=yt;function Bt(r,e){return r===e&&(r!==0||1/r===1/e)||r!==r&&e!==e}var Ht=typeof Object.is=="function"?Object.is:Bt,qt=ee.useState,Vt=ee.useEffect,Kt=ee.useLayoutEffect,zt=ee.useDebugValue;function Jt(r,e){var t=e(),n=qt({inst:{value:t,getSnapshot:e}}),i=n[0].inst,s=n[1];return Kt(function(){i.value=t,i.getSnapshot=e,Ce(i)&&s({inst:i})},[r,t,e]),Vt(function(){return Ce(i)&&s({inst:i}),r(function(){Ce(i)&&s({inst:i})})},[r]),zt(t),t}function Ce(r){var e=r.getSnapshot;r=r.value;try{var t=e();return!Ht(r,t)}catch{return!0}}function Xt(r,e){return e()}var Wt=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Xt:Jt;xt.useSyncExternalStore=ee.useSyncExternalStore!==void 0?ee.useSyncExternalStore:Wt;wt.exports=xt;var Gt=wt.exports;/**
* @license React
* use-sync-external-store-shim/with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Pe=yt,Qt=Gt;function Yt(r,e){return r===e&&(r!==0||1/r===1/e)||r!==r&&e!==e}var Zt=typeof Object.is=="function"?Object.is:Yt,en=Qt.useSyncExternalStore,tn=Pe.useRef,nn=Pe.useEffect,rn=Pe.useMemo,sn=Pe.useDebugValue;vt.useSyncExternalStoreWithSelector=function(r,e,t,n,i){var s=tn(null);if(s.current===null){var o={hasValue:!1,value:null};s.current=o}else o=s.current;s=rn(function(){function u(v){if(!c){if(c=!0,h=v,v=n(v),i!==void 0&&o.hasValue){var m=o.value;if(i(m,v))return d=m}return d=v}if(m=d,Zt(h,v))return m;var w=n(v);return i!==void 0&&i(m,w)?m:(h=v,d=w)}var c=!1,h,d,l=t===void 0?null:t;return[function(){return u(e())},l===null?void 0:function(){return u(l())}]},[e,t,n,i]);var a=en(r,s[0],s[1]);return nn(function(){o.hasValue=!0,o.value=a},[a]),sn(a),a};bt.exports=vt;var Pr=bt.exports,St={exports:{}},Ot={};/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/(function(r){function e(p,b){var y=p.length;p.push(b);e:for(;0<y;){var R=y-1>>>1,C=p[R];if(0<i(C,b))p[R]=b,p[y]=C,y=R;else break e}}function t(p){return p.length===0?null:p[0]}function n(p){if(p.length===0)return null;var b=p[0],y=p.pop();if(y!==b){p[0]=y;e:for(var R=0,C=p.length,N=C>>>1;R<N;){var U=2*(R+1)-1,je=p[U],W=U+1,he=p[W];if(0>i(je,y))W<C&&0>i(he,je)?(p[R]=he,p[W]=y,R=W):(p[R]=je,p[U]=y,R=U);else if(W<C&&0>i(he,y))p[R]=he,p[W]=y,R=W;else break e}}return b}function i(p,b){var y=p.sortIndex-b.sortIndex;return y!==0?y:p.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;r.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();r.unstable_now=function(){return o.now()-a}}var u=[],c=[],h=1,d=null,l=3,v=!1,m=!1,w=!1,O=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(p){for(var b=t(c);b!==null;){if(b.callback===null)n(c);else if(b.startTime<=p)n(c),b.sortIndex=b.expirationTime,e(u,b);else break;b=t(c)}}function k(p){if(w=!1,T(p),!m)if(t(u)!==null)m=!0,g(j);else{var b=t(c);b!==null&&S(k,b.startTime-p)}}function j(p,b){m=!1,w&&(w=!1,L(F),F=-1),v=!0;var y=l;try{for(T(b),d=t(u);d!==null&&(!(d.expirationTime>b)||p&&!H());){var R=d.callback;if(typeof R=="function"){d.callback=null,l=d.priorityLevel;var C=R(d.expirationTime<=b);b=r.unstable_now(),typeof C=="function"?d.callback=C:d===t(u)&&n(u),T(b)}else n(u);d=t(u)}if(d!==null)var N=!0;else{var U=t(c);U!==null&&S(k,U.startTime-b),N=!1}return N}finally{d=null,l=y,v=!1}}var E=!1,x=null,F=-1,I=5,X=-1;function H(){return!(r.unstable_now()-X<I)}function $(){if(x!==null){var p=r.unstable_now();X=p;var b=!0;try{b=x(!0,p)}finally{b?K():(E=!1,x=null)}}else E=!1}var K;if(typeof P=="function")K=function(){P($)};else if(typeof MessageChannel<"u"){var _=new MessageChannel,f=_.port2;_.port1.onmessage=$,K=function(){f.postMessage(null)}}else K=function(){O($,0)};function g(p){x=p,E||(E=!0,K())}function S(p,b){F=O(function(){p(r.unstable_now())},b)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(p){p.callback=null},r.unstable_continueExecution=function(){m||v||(m=!0,g(j))},r.unstable_forceFrameRate=function(p){0>p||125<p?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<p?Math.floor(1e3/p):5},r.unstable_getCurrentPriorityLevel=function(){return l},r.unstable_getFirstCallbackNode=function(){return t(u)},r.unstable_next=function(p){switch(l){case 1:case 2:case 3:var b=3;break;default:b=l}var y=l;l=b;try{return p()}finally{l=y}},r.unstable_pauseExecution=function(){},r.unstable_requestPaint=function(){},r.unstable_runWithPriority=function(p,b){switch(p){case 1:case 2:case 3:case 4:case 5:break;default:p=3}var y=l;l=p;try{return b()}finally{l=y}},r.unstable_scheduleCallback=function(p,b,y){var R=r.unstable_now();switch(typeof y=="object"&&y!==null?(y=y.delay,y=typeof y=="number"&&0<y?R+y:R):y=R,p){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=y+C,p={id:h++,callback:b,priorityLevel:p,startTime:y,expirationTime:C,sortIndex:-1},y>R?(p.sortIndex=y,e(c,p),t(u)===null&&p===t(c)&&(w?(L(F),F=-1):w=!0,S(k,y-R))):(p.sortIndex=C,e(u,p),m||v||(m=!0,g(j))),p},r.unstable_shouldYield=H,r.unstable_wrapCallback=function(p){var b=l;return function(){var y=l;l=b;try{return p.apply(this,arguments)}finally{l=y}}}})(Ot);St.exports=Ot;var Lr=St.exports;function Pt(r){var e,t,n="";if(typeof r=="string"||typeof r=="number")n+=r;else if(typeof r=="object")if(Array.isArray(r)){var i=r.length;for(e=0;e<i;e++)r[e]&&(t=Pt(r[e]))&&(n&&(n+=" "),n+=t)}else for(t in r)r[t]&&(n&&(n+=" "),n+=t);return n}function kr(){for(var r,e,t=0,n="",i=arguments.length;t<i;t++)(r=arguments[t])&&(e=Pt(r))&&(n&&(n+=" "),n+=e);return n}function Ke(){return Ke=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Ke.apply(null,arguments)}function Er(r,e){if(r==null)return{};var t={};for(var n in r)if({}.hasOwnProperty.call(r,n)){if(e.includes(n))continue;t[n]=r[n]}return t}var Lt={exports:{}};(function(r){function e(t){return t&&t.__esModule?t:{default:t}}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports})(Lt);var Rr=Lt.exports,Ae={exports:{}},ze;function jr(){return ze||(ze=1,function(r){function e(){return r.exports=e=Object.assign?Object.assign.bind():function(t){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var s in i)({}).hasOwnProperty.call(i,s)&&(t[s]=i[s])}return t},r.exports.__esModule=!0,r.exports.default=r.exports,e.apply(null,arguments)}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports}(Ae)),Ae.exports}var Te={exports:{}},Je;function Cr(){return Je||(Je=1,function(r){function e(t,n){if(t==null)return{};var i={};for(var s in t)if({}.hasOwnProperty.call(t,s)){if(n.includes(s))continue;i[s]=t[s]}return i}r.exports=e,r.exports.__esModule=!0,r.exports.default=r.exports}(Te)),Te.exports}var Ar="-ms-",Tr="-moz-",Nr="-webkit-",kt="comm",Et="rule",Rt="decl",on="@import",an="@keyframes",un="@layer",ln=Math.abs,qe=String.fromCharCode,fn=Object.assign;function $r(r,e){return q(r,0)^45?(((e<<2^q(r,0))<<2^q(r,1))<<2^q(r,2))<<2^q(r,3):0}function jt(r){return r.trim()}function Dr(r,e){return(r=e.exec(r))?r[0]:r}function me(r,e,t){return r.replace(e,t)}function cn(r,e){return r.indexOf(e)}function q(r,e){return r.charCodeAt(e)|0}function le(r,e,t){return r.slice(e,t)}function J(r){return r.length}function Ve(r){return r.length}function de(r,e){return e.push(r),r}function Ir(r,e){return r.map(e).join("")}var Le=1,te=1,Ct=0,M=0,A=0,re="";function ke(r,e,t,n,i,s,o){return{value:r,root:e,parent:t,type:n,props:i,children:s,line:Le,column:te,length:o,return:""}}function Fr(r,e){return fn(ke("",null,null,"",null,null,0),r,{length:-r.length},e)}function hn(){return A}function dn(){return A=M>0?q(re,--M):0,te--,A===10&&(te=1,Le--),A}function B(){return A=M<Ct?q(re,M++):0,te++,A===10&&(te=1,Le++),A}function G(){return q(re,M)}function ye(){return M}function Ee(r,e){return le(re,r,e)}function Ie(r){switch(r){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function pn(r){return Le=te=1,Ct=J(re=r),M=0,[]}function gn(r){return re="",r}function Ne(r){return jt(Ee(M-1,Fe(r===91?r+2:r===40?r+1:r)))}function mn(r){for(;(A=G())&&A<33;)B();return Ie(r)>2||Ie(A)>3?"":" "}function yn(r,e){for(;--e&&B()&&!(A<48||A>102||A>57&&A<65||A>70&&A<97););return Ee(r,ye()+(e<6&&G()==32&&B()==32))}function Fe(r){for(;B();)switch(A){case r:return M;case 34:case 39:r!==34&&r!==39&&Fe(A);break;case 40:r===41&&Fe(r);break;case 92:B();break}return M}function bn(r,e){for(;B()&&r+A!==57;)if(r+A===84&&G()===47)break;return"/*"+Ee(e,M-1)+"*"+qe(r===47?r:B())}function vn(r){for(;!Ie(G());)B();return Ee(r,M)}function _r(r){return gn(be("",null,null,null,[""],r=pn(r),0,[0],r))}function be(r,e,t,n,i,s,o,a,u){for(var c=0,h=0,d=o,l=0,v=0,m=0,w=1,O=1,L=1,P=0,T="",k=i,j=s,E=n,x=T;O;)switch(m=P,P=B()){case 40:if(m!=108&&q(x,d-1)==58){cn(x+=me(Ne(P),"&","&\f"),"&\f")!=-1&&(L=-1);break}case 34:case 39:case 91:x+=Ne(P);break;case 9:case 10:case 13:case 32:x+=mn(m);break;case 92:x+=yn(ye()-1,7);continue;case 47:switch(G()){case 42:case 47:de(wn(bn(B(),ye()),e,t),u);break;default:x+="/"}break;case 123*w:a[c++]=J(x)*L;case 125*w:case 59:case 0:switch(P){case 0:case 125:O=0;case 59+h:L==-1&&(x=me(x,/\f/g,"")),v>0&&J(x)-d&&de(v>32?We(x+";",n,t,d-1):We(me(x," ","")+";",n,t,d-2),u);break;case 59:x+=";";default:if(de(E=Xe(x,e,t,c,h,i,a,T,k=[],j=[],d),s),P===123)if(h===0)be(x,e,E,E,k,s,d,a,j);else switch(l===99&&q(x,3)===110?100:l){case 100:case 108:case 109:case 115:be(r,E,E,n&&de(Xe(r,E,E,0,0,i,a,T,i,k=[],d),j),i,j,d,a,n?k:j);break;default:be(x,E,E,E,[""],j,0,a,j)}}c=h=v=0,w=L=1,T=x="",d=o;break;case 58:d=1+J(x),v=m;default:if(w<1){if(P==123)--w;else if(P==125&&w++==0&&dn()==125)continue}switch(x+=qe(P),P*w){case 38:L=h>0?1:(x+="\f",-1);break;case 44:a[c++]=(J(x)-1)*L,L=1;break;case 64:G()===45&&(x+=Ne(B())),l=G(),h=d=J(T=x+=vn(ye())),P++;break;case 45:m===45&&J(x)==2&&(w=0)}}return s}function Xe(r,e,t,n,i,s,o,a,u,c,h){for(var d=i-1,l=i===0?s:[""],v=Ve(l),m=0,w=0,O=0;m<n;++m)for(var L=0,P=le(r,d+1,d=ln(w=o[m])),T=r;L<v;++L)(T=jt(w>0?l[L]+" "+P:me(P,/&\f/g,l[L])))&&(u[O++]=T);return ke(r,e,t,i===0?Et:a,u,c,h)}function wn(r,e,t){return ke(r,e,t,kt,qe(hn()),le(r,2,-2),0)}function We(r,e,t,n){return ke(r,e,t,Rt,le(r,0,n),le(r,n+1,-1),n)}function Ge(r,e){for(var t="",n=Ve(r),i=0;i<n;i++)t+=e(r[i],i,r,e)||"";return t}function Ur(r,e,t,n){switch(r.type){case un:if(r.children.length)break;case on:case Rt:return r.return=r.return||r.value;case kt:return"";case an:return r.return=r.value+"{"+Ge(r.children,n)+"}";case Et:r.value=r.props.join(",")}return J(t=Ge(r.children,n))?r.return=r.value+"{"+t+"}":""}function Mr(r){var e=Ve(r);return function(t,n,i,s){for(var o="",a=0;a<e;a++)o+=r[a](t,n,i,s)||"";return o}}function Br(r){return function(e){e.root||(e=e.return)&&r(e)}}function _e(r,e){return _e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t},_e(r,e)}function Hr(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,_e(r,e)}function qr(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}const xn={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,e){console&&console[r]&&console[r].apply(console,e)}};class ve{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||xn,this.options=t,this.debug=t.debug}log(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"log","",!0)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","",!0)}error(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"error","")}deprecate(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,i){return i&&!this.debug?null:(typeof e[0]=="string"&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new ve(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new ve(this.logger,e)}}var V=new ve;class Re{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(t)||0;this.observers[n].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,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];this.observers[e]&&Array.from(this.observers[e].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(o=>{let[a,u]=o;for(let c=0;c<u;c++)a.apply(a,[e,...n])})}}function ie(){let r,e;const t=new Promise((n,i)=>{r=n,e=i});return t.resolve=r,t.reject=e,t}function Qe(r){return r==null?"":""+r}function Sn(r,e,t){r.forEach(n=>{e[n]&&(t[n]=e[n])})}const On=/###/g;function ue(r,e,t){function n(a){return a&&a.indexOf("###")>-1?a.replace(On,"."):a}function i(){return!r||typeof r=="string"}const s=typeof e!="string"?e:e.split(".");let o=0;for(;o<s.length-1;){if(i())return{};const a=n(s[o]);!r[a]&&t&&(r[a]=new t),Object.prototype.hasOwnProperty.call(r,a)?r=r[a]:r={},++o}return i()?{}:{obj:r,k:n(s[o])}}function Ye(r,e,t){const{obj:n,k:i}=ue(r,e,Object);if(n!==void 0||e.length===1){n[i]=t;return}let s=e[e.length-1],o=e.slice(0,e.length-1),a=ue(r,o,Object);for(;a.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),a=ue(r,o,Object),a&&a.obj&&typeof a.obj[`${a.k}.${s}`]<"u"&&(a.obj=void 0);a.obj[`${a.k}.${s}`]=t}function Pn(r,e,t,n){const{obj:i,k:s}=ue(r,e,Object);i[s]=i[s]||[],i[s].push(t)}function we(r,e){const{obj:t,k:n}=ue(r,e);if(t)return t[n]}function Ln(r,e,t){const n=we(r,t);return n!==void 0?n:we(e,t)}function At(r,e,t){for(const n in e)n!=="__proto__"&&n!=="constructor"&&(n in r?typeof r[n]=="string"||r[n]instanceof String||typeof e[n]=="string"||e[n]instanceof String?t&&(r[n]=e[n]):At(r[n],e[n],t):r[n]=e[n]);return r}function Y(r){return r.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var kn={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function En(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,e=>kn[e]):r}class Rn{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 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}}const jn=[" ",",","?","!",";"],Cn=new Rn(20);function An(r,e,t){e=e||"",t=t||"";const n=jn.filter(o=>e.indexOf(o)<0&&t.indexOf(o)<0);if(n.length===0)return!0;const i=Cn.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!i.test(r);if(!s){const o=r.indexOf(t);o>0&&!i.test(r.substring(0,o))&&(s=!0)}return s}function Ue(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[e])return r[e];const n=e.split(t);let i=r;for(let s=0;s<n.length;){if(!i||typeof i!="object")return;let o,a="";for(let u=s;u<n.length;++u)if(u!==s&&(a+=t),a+=n[u],o=i[a],o!==void 0){if(["string","number","boolean"].indexOf(typeof o)>-1&&u<n.length-1)continue;s+=u-s+1;break}i=o}return i}function xe(r){return r&&r.indexOf("_")>0?r.replace("_","-"):r}class Ze extends Re{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,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let a;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):typeof n=="string"&&s?a.push(...n.split(s)):a.push(n)));const u=we(this.data,a);return!u&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),u||!o||typeof n!="string"?u:Ue(this.data&&this.data[e]&&this.data[e][t],n,s)}addResource(e,t,n,i){let s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=[e,t];n&&(a=a.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(a=e.split("."),i=t,t=a[1]),this.addNamespaces(t),Ye(this.data,a,i),s.silent||this.emit("added",e,t,n,i)}addResources(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const s in n)(typeof n[s]=="string"||Array.isArray(n[s]))&&this.addResource(e,t,s,n[s],{silent:!0});i.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},a=[e,t];e.indexOf(".")>-1&&(a=e.split("."),i=n,n=t,t=a[1]),this.addNamespaces(t);let u=we(this.data,a)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?At(u,n,s):u={...u,...n},Ye(this.data,a,u),o.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||(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 Tt={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,e,t,n,i){return r.forEach(s=>{this.processors[s]&&(e=this.processors[s].process(e,t,n,i))}),e}};const et={};class Se extends Re{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),Sn(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=V.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 n=this.resolve(e,t);return n&&n.res!==void 0}extractFromKey(e,t){let n=t.nsSeparator!==void 0?t.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator;let s=t.ns||this.options.defaultNS||[];const o=n&&e.indexOf(n)>-1,a=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!An(e,n,i);if(o&&!a){const u=e.match(this.interpolator.nestingRegexp);if(u&&u.length>0)return{key:e,namespaces:s};const c=e.split(n);(n!==i||n===i&&this.options.ns.indexOf(c[0])>-1)&&(s=c.shift()),e=c.join(i)}return typeof s=="string"&&(s=[s]),{key:e,namespaces:s}}translate(e,t,n){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,s=t.keySeparator!==void 0?t.keySeparator:this.options.keySeparator,{key:o,namespaces:a}=this.extractFromKey(e[e.length-1],t),u=a[a.length-1],c=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c&&c.toLowerCase()==="cimode"){if(h){const k=t.nsSeparator||this.options.nsSeparator;return i?{res:`${u}${k}${o}`,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:`${u}${k}${o}`}return i?{res:o,usedKey:o,exactUsedKey:o,usedLng:c,usedNS:u,usedParams:this.getUsedParamsDetails(t)}:o}const d=this.resolve(e,t);let l=d&&d.res;const v=d&&d.usedKey||o,m=d&&d.exactUsedKey||o,w=Object.prototype.toString.apply(l),O=["[object Number]","[object Function]","[object RegExp]"],L=t.joinArrays!==void 0?t.joinArrays:this.options.joinArrays,P=!this.i18nFormat||this.i18nFormat.handleAsObject;if(P&&l&&(typeof l!="string"&&typeof l!="boolean"&&typeof l!="number")&&O.indexOf(w)<0&&!(typeof L=="string"&&Array.isArray(l))){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const k=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,l,{...t,ns:a}):`key '${o} (${this.language})' returned an object instead of string.`;return i?(d.res=k,d.usedParams=this.getUsedParamsDetails(t),d):k}if(s){const k=Array.isArray(l),j=k?[]:{},E=k?m:v;for(const x in l)if(Object.prototype.hasOwnProperty.call(l,x)){const F=`${E}${s}${x}`;j[x]=this.translate(F,{...t,joinArrays:!1,ns:a}),j[x]===F&&(j[x]=l[x])}l=j}}else if(P&&typeof L=="string"&&Array.isArray(l))l=l.join(L),l&&(l=this.extendTranslation(l,e,t,n));else{let k=!1,j=!1;const E=t.count!==void 0&&typeof t.count!="string",x=Se.hasDefaultValue(t),F=E?this.pluralResolver.getSuffix(c,t.count,t):"",I=t.ordinal&&E?this.pluralResolver.getSuffix(c,t.count,{ordinal:!1}):"",X=E&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),H=X&&t[`defaultValue${this.options.pluralSeparator}zero`]||t[`defaultValue${F}`]||t[`defaultValue${I}`]||t.defaultValue;!this.isValidLookup(l)&&x&&(k=!0,l=H),this.isValidLookup(l)||(j=!0,l=o);const K=(t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&j?void 0:l,_=x&&H!==l&&this.options.updateMissing;if(j||k||_){if(this.logger.log(_?"updateKey":"missingKey",c,u,o,_?H:l),s){const p=this.resolve(o,{...t,keySeparator:!1});p&&p.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 f=[];const g=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if(this.options.saveMissingTo==="fallback"&&g&&g[0])for(let p=0;p<g.length;p++)f.push(g[p]);else this.options.saveMissingTo==="all"?f=this.languageUtils.toResolveHierarchy(t.lng||this.language):f.push(t.lng||this.language);const S=(p,b,y)=>{const R=x&&y!==l?y:K;this.options.missingKeyHandler?this.options.missingKeyHandler(p,u,b,R,_,t):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(p,u,b,R,_,t),this.emit("missingKey",p,u,b,l)};this.options.saveMissing&&(this.options.saveMissingPlurals&&E?f.forEach(p=>{const b=this.pluralResolver.getSuffixes(p,t);X&&t[`defaultValue${this.options.pluralSeparator}zero`]&&b.indexOf(`${this.options.pluralSeparator}zero`)<0&&b.push(`${this.options.pluralSeparator}zero`),b.forEach(y=>{S([p],o+y,t[`defaultValue${y}`]||H)})}):S(f,o,H))}l=this.extendTranslation(l,e,t,d,n),j&&l===o&&this.options.appendNamespaceToMissingKey&&(l=`${u}:${o}`),(j||k)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?l=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}:${o}`:o,k?l:void 0):l=this.options.parseMissingKeyHandler(l))}return i?(d.res=l,d.usedParams=this.getUsedParamsDetails(t),d):l}extendTranslation(e,t,n,i,s){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const c=typeof e=="string"&&(n&&n.interpolation&&n.interpolation.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(c){const l=e.match(this.interpolator.nestingRegexp);h=l&&l.length}let d=n.replace&&typeof n.replace!="string"?n.replace:n;if(this.options.interpolation.defaultVariables&&(d={...this.options.interpolation.defaultVariables,...d}),e=this.interpolator.interpolate(e,d,n.lng||this.language||i.usedLng,n),c){const l=e.match(this.interpolator.nestingRegexp),v=l&&l.length;h<v&&(n.nest=!1)}!n.lng&&this.options.compatibilityAPI!=="v1"&&i&&i.res&&(n.lng=this.language||i.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,function(){for(var l=arguments.length,v=new Array(l),m=0;m<l;m++)v[m]=arguments[m];return s&&s[0]===v[0]&&!n.context?(o.logger.warn(`It seems you are nesting recursively key: ${v[0]} in key: ${t[0]}`),null):o.translate(...v,t)},n)),n.interpolation&&this.interpolator.reset()}const a=n.postProcess||this.options.postProcess,u=typeof a=="string"?[a]:a;return e!=null&&u&&u.length&&n.applyPostProcessor!==!1&&(e=Tt.handle(u,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n,i,s,o,a;return typeof e=="string"&&(e=[e]),e.forEach(u=>{if(this.isValidLookup(n))return;const c=this.extractFromKey(u,t),h=c.key;i=h;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const l=t.count!==void 0&&typeof t.count!="string",v=l&&!t.ordinal&&t.count===0&&this.pluralResolver.shouldUseIntlApi(),m=t.context!==void 0&&(typeof t.context=="string"||typeof t.context=="number")&&t.context!=="",w=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);d.forEach(O=>{this.isValidLookup(n)||(a=O,!et[`${w[0]}-${O}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(a)&&(et[`${w[0]}-${O}`]=!0,this.logger.warn(`key "${i}" for languages "${w.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),w.forEach(L=>{if(this.isValidLookup(n))return;o=L;const P=[h];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(P,h,L,O,t);else{let k;l&&(k=this.pluralResolver.getSuffix(L,t.count,t));const j=`${this.options.pluralSeparator}zero`,E=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(l&&(P.push(h+k),t.ordinal&&k.indexOf(E)===0&&P.push(h+k.replace(E,this.options.pluralSeparator)),v&&P.push(h+j)),m){const x=`${h}${this.options.contextSeparator}${t.context}`;P.push(x),l&&(P.push(x+k),t.ordinal&&k.indexOf(E)===0&&P.push(x+k.replace(E,this.options.pluralSeparator)),v&&P.push(x+j))}}let T;for(;T=P.pop();)this.isValidLookup(n)||(s=T,n=this.getResource(L,O,T,t))}))})}),{res:n,usedKey:i,exactUsedKey:s,usedLng:o,usedNS:a}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,i):this.resourceStore.getResource(e,t,n,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"],n=e.replace&&typeof e.replace!="string";let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const s of t)delete i[s]}return i}static hasDefaultValue(e){const t="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&e[n]!==void 0)return!0;return!1}}function $e(r){return r.charAt(0).toUpperCase()+r.slice(1)}class tt{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=V.create("languageUtils")}getScriptPartFromCode(e){if(e=xe(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=xe(e),!e||e.indexOf("-")<0)return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(typeof e=="string"&&e.indexOf("-")>-1){const t=["hans","hant","latn","cyrl","cans","mong","arab"];let n=e.split("-");return this.options.lowerCaseLng?n=n.map(i=>i.toLowerCase()):n.length===2?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(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()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=$e(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=$e(n[2].toLowerCase()))),n.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(n=>{if(t)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(t=i)}),!t&&this.options.supportedLngs&&e.forEach(n=>{if(t)return;const i=this.getLanguagePartFromCode(n);if(this.isSupportedCode(i))return t=i;t=this.options.supportedLngs.find(s=>{if(s===i)return s;if(!(s.indexOf("-")<0&&i.indexOf("-")<0)&&(s.indexOf("-")>0&&i.indexOf("-")<0&&s.substring(0,s.indexOf("-"))===i||s.indexOf(i)===0&&i.length>1))return s})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),typeof e=="string"&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){const n=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],s=o=>{o&&(this.isSupportedCode(o)?i.push(o):this.logger.warn(`rejecting language code not found in supportedLngs: ${o}`))};return typeof e=="string"&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):typeof e=="string"&&s(this.formatLanguageCode(e)),n.forEach(o=>{i.indexOf(o)<0&&s(this.formatLanguageCode(o))}),i}}let Tn=[{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}],Nn={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}};const $n=["v1","v2","v3"],Dn=["v4"],nt={zero:0,one:1,two:2,few:3,many:4,other:5};function In(){const r={};return Tn.forEach(e=>{e.lngs.forEach(t=>{r[t]={numbers:e.nr,plurals:Nn[e.fc]}})}),r}class Fn{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=e,this.options=t,this.logger=V.create("pluralResolver"),(!this.options.compatibilityJSON||Dn.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=In()}addRule(e,t){this.rules[e]=t}getRule(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(xe(e==="dev"?"en":e),{type:t.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}needsPlural(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const 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(i=>`${t}${i}`)}getSuffixes(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const n=this.getRule(e,t);return n?this.shouldUseIntlApi()?n.resolvedOptions().pluralCategories.sort((i,s)=>nt[i]-nt[s]).map(i=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${i}`):n.numbers.map(i=>this.getSuffix(e,i,t)):[]}getSuffix(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(e,n);return i?this.shouldUseIntlApi()?`${this.options.prepend}${n.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 n=e.noAbs?e.plurals(t):e.plurals(Math.abs(t));let i=e.numbers[n];this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const s=()=>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()}`:s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&e.numbers.length===2&&e.numbers[0]===1?s():this.options.prepend&&n.toString()?this.options.prepend+n.toString():n.toString()}shouldUseIntlApi(){return!$n.includes(this.options.compatibilityJSON)}}function rt(r,e,t){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=Ln(r,e,t);return!s&&i&&typeof t=="string"&&(s=Ue(r,t,n),s===void 0&&(s=Ue(e,t,n))),s}class _n{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=V.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:n,useRawValueToEscape:i,prefix:s,prefixEscaped:o,suffix:a,suffixEscaped:u,formatSeparator:c,unescapeSuffix:h,unescapePrefix:d,nestingPrefix:l,nestingPrefixEscaped:v,nestingSuffix:m,nestingSuffixEscaped:w,nestingOptionsSeparator:O,maxReplaces:L,alwaysFormat:P}=e.interpolation;this.escape=t!==void 0?t:En,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Y(s):o||"{{",this.suffix=a?Y(a):u||"}}",this.formatSeparator=c||",",this.unescapePrefix=h?"":d||"-",this.unescapeSuffix=this.unescapePrefix?"":h||"",this.nestingPrefix=l?Y(l):v||Y("$t("),this.nestingSuffix=m?Y(m):w||Y(")"),this.nestingOptionsSeparator=O||",",this.maxReplaces=L||1e3,this.alwaysFormat=P!==void 0?P:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(t,n)=>t&&t.source===n?(t.lastIndex=0,t):new RegExp(n,"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,n,i){let s,o,a;const u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(m){return m.replace(/\$/g,"$$$$")}const h=m=>{if(m.indexOf(this.formatSeparator)<0){const P=rt(t,u,m,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(P,void 0,n,{...i,...t,interpolationkey:m}):P}const w=m.split(this.formatSeparator),O=w.shift().trim(),L=w.join(this.formatSeparator).trim();return this.format(rt(t,u,O,this.options.keySeparator,this.options.ignoreJSONStructure),L,n,{...i,...t,interpolationkey:O})};this.resetRegExp();const d=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,l=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:m=>c(m)},{regex:this.regexp,safeValue:m=>this.escapeValue?c(this.escape(m)):c(m)}].forEach(m=>{for(a=0;s=m.regex.exec(e);){const w=s[1].trim();if(o=h(w),o===void 0)if(typeof d=="function"){const L=d(e,s,i);o=typeof L=="string"?L:""}else if(i&&Object.prototype.hasOwnProperty.call(i,w))o="";else if(l){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${w} for interpolating ${e}`),o="";else typeof o!="string"&&!this.useRawValueToEscape&&(o=Qe(o));const O=m.safeValue(o);if(e=e.replace(s[0],O),l?(m.regex.lastIndex+=o.length,m.regex.lastIndex-=s[0].length):m.regex.lastIndex=0,a++,a>=this.maxReplaces)break}}),e}nest(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o;function a(u,c){const h=this.nestingOptionsSeparator;if(u.indexOf(h)<0)return u;const d=u.split(new RegExp(`${h}[ ]*{`));let l=`{${d[1]}`;u=d[0],l=this.interpolate(l,o);const v=l.match(/'/g),m=l.match(/"/g);(v&&v.length%2===0&&!m||m.length%2!==0)&&(l=l.replace(/'/g,'"'));try{o=JSON.parse(l),c&&(o={...c,...o})}catch(w){return this.logger.warn(`failed parsing options string in nesting for key ${u}`,w),`${u}${h}${l}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,u}for(;i=this.nestingRegexp.exec(e);){let u=[];o={...n},o=o.replace&&typeof o.replace!="string"?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;let c=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const h=i[1].split(this.formatSeparator).map(d=>d.trim());i[1]=h.shift(),u=h,c=!0}if(s=t(a.call(this,i[1].trim(),o),o),s&&i[0]===e&&typeof s!="string")return s;typeof s!="string"&&(s=Qe(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),c&&(s=u.reduce((h,d)=>this.format(h,d,n.lng,{...n,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}function Un(r){let e=r.toLowerCase().trim();const t={};if(r.indexOf("(")>-1){const n=r.split("(");e=n[0].toLowerCase().trim();const i=n[1].substring(0,n[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(o=>{if(o){const[a,...u]=o.split(":"),c=u.join(":").trim().replace(/^'+|'+$/g,""),h=a.trim();t[h]||(t[h]=c),c==="false"&&(t[h]=!1),c==="true"&&(t[h]=!0),isNaN(c)||(t[h]=parseInt(c,10))}})}return{formatName:e,formatOptions:t}}function Z(r){const e={};return function(n,i,s){const o=i+JSON.stringify(s);let a=e[o];return a||(a=r(xe(i),s),e[o]=a),a(n)}}class Mn{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=V.create("formatter"),this.options=e,this.formats={number:Z((t,n)=>{const i=new Intl.NumberFormat(t,{...n});return s=>i.format(s)}),currency:Z((t,n)=>{const i=new Intl.NumberFormat(t,{...n,style:"currency"});return s=>i.format(s)}),datetime:Z((t,n)=>{const i=new Intl.DateTimeFormat(t,{...n});return s=>i.format(s)}),relativetime:Z((t,n)=>{const i=new Intl.RelativeTimeFormat(t,{...n});return s=>i.format(s,n.range||"day")}),list:Z((t,n)=>{const i=new Intl.ListFormat(t,{...n});return s=>i.format(s)})},this.init(e)}init(e){const n=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=Z(t)}format(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return t.split(this.formatSeparator).reduce((a,u)=>{const{formatName:c,formatOptions:h}=Un(u);if(this.formats[c]){let d=a;try{const l=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},v=l.locale||l.lng||i.locale||i.lng||n;d=this.formats[c](a,v,{...h,...i,...l})}catch(l){this.logger.warn(l)}return d}else this.logger.warn(`there was no format function for ${c}`);return a},e)}}function Bn(r,e){r.pending[e]!==void 0&&(delete r.pending[e],r.pendingCount--)}class Hn extends Re{constructor(e,t,n){let i=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=i,this.logger=V.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(n,i.backend,i)}queueLoad(e,t,n,i){const s={},o={},a={},u={};return e.forEach(c=>{let h=!0;t.forEach(d=>{const l=`${c}|${d}`;!n.reload&&this.store.hasResourceBundle(c,d)?this.state[l]=2:this.state[l]<0||(this.state[l]===1?o[l]===void 0&&(o[l]=!0):(this.state[l]=1,h=!1,o[l]===void 0&&(o[l]=!0),s[l]===void 0&&(s[l]=!0),u[d]===void 0&&(u[d]=!0)))}),h||(a[c]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(u)}}loaded(e,t,n){const i=e.split("|"),s=i[0],o=i[1];t&&this.emit("failedLoading",s,o,t),n&&this.store.addResourceBundle(s,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2;const a={};this.queue.forEach(u=>{Pn(u.loaded,[s],o),Bn(u,e),t&&u.errors.push(t),u.pendingCount===0&&!u.done&&(Object.keys(u.loaded).forEach(c=>{a[c]||(a[c]={});const h=u.loaded[c];h.length&&h.forEach(d=>{a[c][d]===void 0&&(a[c][d]=!0)})}),u.done=!0,u.errors.length?u.callback(u.errors):u.callback())}),this.emit("loaded",a),this.queue=this.queue.filter(u=>!u.done)}read(e,t,n){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,o=arguments.length>5?arguments[5]:void 0;if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:s,callback:o});return}this.readingCalls++;const a=(c,h)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&h&&i<this.maxRetries){setTimeout(()=>{this.read.call(this,e,t,n,i+1,s*2,o)},s);return}o(c,h)},u=this.backend[n].bind(this.backend);if(u.length===2){try{const c=u(e,t);c&&typeof c.then=="function"?c.then(h=>a(null,h)).catch(a):a(null,c)}catch(c){a(c)}return}return u(e,t,a)}prepareLoading(e,t){let n=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();typeof e=="string"&&(e=this.languageUtils.toResolveHierarchy(e)),typeof t=="string"&&(t=[t]);const s=this.queueLoad(e,t,n,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}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]:"";const n=e.split("|"),i=n[0],s=n[1];this.read(i,s,"read",void 0,void 0,(o,a)=>{o&&this.logger.warn(`${t}loading namespace ${s} for language ${i} failed`,o),!o&&a&&this.logger.log(`${t}loaded namespace ${s} for language ${i}`,a),this.loaded(e,o,a)})}saveMissing(e,t,n,i,s){let o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},a=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){const u={...o,isUpdate:s},c=this.backend.create.bind(this.backend);if(c.length<6)try{let h;c.length===5?h=c(e,t,n,i,u):h=c(e,t,n,i),h&&typeof h.then=="function"?h.then(d=>a(null,d)).catch(a):a(null,h)}catch(h){a(h)}else c(e,t,n,i,a,u)}!e||!e[0]||this.store.addResource(e[0],t,n,i)}}}function it(){return{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:function(e){let t={};if(typeof e[1]=="object"&&(t=e[1]),typeof e[1]=="string"&&(t.defaultValue=e[1]),typeof e[2]=="string"&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function st(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function pe(){}function qn(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(t=>{typeof r[t]=="function"&&(r[t]=r[t].bind(r))})}class fe extends Re{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;if(super(),this.options=st(e),this.services={},this.logger=V,this.modules={external:[]},qn(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]:{},n=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),!t.defaultNS&&t.defaultNS!==!1&&t.ns&&(typeof t.ns=="string"?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));const i=it();this.options={...i,...this.options,...st(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);function s(h){return h?typeof h=="function"?new h:h:null}if(!this.options.isClone){this.modules.logger?V.init(s(this.modules.logger),this.options):V.init(null,this.options);let h;this.modules.formatter?h=this.modules.formatter:typeof Intl<"u"&&(h=Mn);const d=new tt(this.options);this.store=new Ze(this.options.resources,this.options);const l=this.services;l.logger=V,l.resourceStore=this.store,l.languageUtils=d,l.pluralResolver=new Fn(d,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),h&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=s(h),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new _n(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new Hn(s(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(v){for(var m=arguments.length,w=new Array(m>1?m-1:0),O=1;O<m;O++)w[O-1]=arguments[O];e.emit(v,...w)}),this.modules.languageDetector&&(l.languageDetector=s(this.modules.languageDetector),l.languageDetector.init&&l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=s(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new Se(this.services,this.options),this.translator.on("*",function(v){for(var m=arguments.length,w=new Array(m>1?m-1:0),O=1;O<m;O++)w[O-1]=arguments[O];e.emit(v,...w)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,n||(n=pe),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const h=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);h.length>0&&h[0]!=="dev"&&(this.options.lng=h[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(h=>{this[h]=function(){return e.store[h](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(h=>{this[h]=function(){return e.store[h](...arguments),e}});const u=ie(),c=()=>{const h=(d,l)=>{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),u.resolve(l),n(d,l)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return h(null,this.t.bind(this));this.changeLanguage(this.options.lng,h)};return this.options.resources||!this.options.initImmediate?c():setTimeout(c,0),u}loadResources(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pe;const i=typeof e=="string"?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],o=a=>{if(!a||a==="cimode")return;this.services.languageUtils.toResolveHierarchy(a).forEach(c=>{c!=="cimode"&&s.indexOf(c)<0&&s.push(c)})};i?o(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>o(u)),this.options.preload&&this.options.preload.forEach(a=>o(a)),this.services.backendConnector.load(s,this.options.ns,a=>{!a&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(a)})}else n(null)}reloadResources(e,t,n){const i=ie();return e||(e=this.languages),t||(t=this.options.ns),n||(n=pe),this.services.backendConnector.reload(e,t,s=>{i.resolve(),n(s)}),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"&&Tt.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 n=this.languages[t];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}changeLanguage(e,t){var n=this;this.isLanguageChangingTo=e;const i=ie();this.emit("languageChanging",e);const s=u=>{this.language=u,this.languages=this.services.languageUtils.toResolveHierarchy(u),this.resolvedLanguage=void 0,this.setResolvedLanguage(u)},o=(u,c)=>{c?(s(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve(function(){return n.t(...arguments)}),t&&t(u,function(){return n.t(...arguments)})},a=u=>{!e&&!u&&this.services.languageDetector&&(u=[]);const c=typeof u=="string"?u:this.services.languageUtils.getBestMatchFromCodes(u);c&&(this.language||s(c),this.translator.language||this.translator.changeLanguage(c),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(c)),this.loadResources(c,h=>{o(h,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),i}getFixedT(e,t,n){var i=this;const s=function(o,a){let u;if(typeof a!="object"){for(var c=arguments.length,h=new Array(c>2?c-2:0),d=2;d<c;d++)h[d-2]=arguments[d];u=i.options.overloadTranslationOptionHandler([o,a].concat(h))}else u={...a};u.lng=u.lng||s.lng,u.lngs=u.lngs||s.lngs,u.ns=u.ns||s.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||n||s.keyPrefix);const l=i.options.keySeparator||".";let v;return u.keyPrefix&&Array.isArray(o)?v=o.map(m=>`${u.keyPrefix}${l}${m}`):v=u.keyPrefix?`${u.keyPrefix}${l}${o}`:o,i.t(v,u)};return typeof e=="string"?s.lng=e:s.lngs=e,s.ns=t,s.keyPrefix=n,s}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;const n=t.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(a,u)=>{const c=this.services.backendConnector.state[`${a}|${u}`];return c===-1||c===2};if(t.precheck){const a=t.precheck(this,o);if(a!==void 0)return a}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(s,e)))}loadNamespaces(e,t){const n=ie();return this.options.ns?(typeof e=="string"&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),t&&t(i)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){const n=ie();typeof e=="string"&&(e=[e]);const i=this.options.preload||[],s=e.filter(o=>i.indexOf(o)<0&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=i.concat(s),this.loadResources(o=>{n.resolve(),t&&t(o)}),n):(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"],n=this.services&&this.services.languageUtils||new tt(it());return t.indexOf(n.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 fe(e,t)}cloneInstance(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pe;const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new fe(i);return(e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(a=>{s[a]=this[a]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},n&&(s.store=new Ze(this.store.data,i),s.services.resourceStore=s.store),s.translator=new Se(s.services,i),s.translator.on("*",function(a){for(var u=arguments.length,c=new Array(u>1?u-1:0),h=1;h<u;h++)c[h-1]=arguments[h];s.emit(a,...c)}),s.init(i,t),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const D=fe.createInstance();D.createInstance=fe.createInstance;D.createInstance;D.dir;D.init;D.loadResources;D.reloadResources;D.use;D.changeLanguage;D.getFixedT;const Vr=D.t;D.exists;D.setDefaultNamespace;D.hasLoadedNamespace;D.loadNamespaces;D.loadLanguages;const{slice:Vn,forEach:Kn}=[];function zn(r){return Kn.call(Vn.call(arguments,1),e=>{if(e)for(const t in e)r[t]===void 0&&(r[t]=e[t])}),r}const ot=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Jn=(r,e,t)=>{const n=t||{};n.path=n.path||"/";const i=encodeURIComponent(e);let s=`${r}=${i}`;if(n.maxAge>0){const o=n.maxAge-0;if(Number.isNaN(o))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(o)}`}if(n.domain){if(!ot.test(n.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${n.domain}`}if(n.path){if(!ot.test(n.path))throw new TypeError("option path is invalid");s+=`; Path=${n.path}`}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");s+=`; Expires=${n.expires.toUTCString()}`}if(n.httpOnly&&(s+="; HttpOnly"),n.secure&&(s+="; Secure"),n.sameSite)switch(typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s},at={create(r,e,t,n){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};t&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+t*60*1e3)),n&&(i.domain=n),document.cookie=Jn(r,encodeURIComponent(e),i)},read(r){const e=`${r}=`,t=document.cookie.split(";");for(let n=0;n<t.length;n++){let i=t[n];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(r){this.create(r,"",-1)}};var Xn={name:"cookie",lookup(r){let{lookupCookie:e}=r;if(e&&typeof document<"u")return at.read(e)||void 0},cacheUserLanguage(r,e){let{lookupCookie:t,cookieMinutes:n,cookieDomain:i,cookieOptions:s}=e;t&&typeof document<"u"&&at.create(t,r,n,i,s)}},Wn={name:"querystring",lookup(r){var n;let{lookupQuerystring:e}=r,t;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((n=window.location.hash)==null?void 0:n.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const o=i.substring(1).split("&");for(let a=0;a<o.length;a++){const u=o[a].indexOf("=");u>0&&o[a].substring(0,u)===e&&(t=o[a].substring(u+1))}}return t}};let se=null;const ut=()=>{if(se!==null)return se;try{se=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{se=!1}return se};var Gn={name:"localStorage",lookup(r){let{lookupLocalStorage:e}=r;if(e&&ut())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupLocalStorage:t}=e;t&&ut()&&window.localStorage.setItem(t,r)}};let oe=null;const lt=()=>{if(oe!==null)return oe;try{oe=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{oe=!1}return oe};var Qn={name:"sessionStorage",lookup(r){let{lookupSessionStorage:e}=r;if(e&&lt())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(r,e){let{lookupSessionStorage:t}=e;t&&lt()&&window.sessionStorage.setItem(t,r)}},Yn={name:"navigator",lookup(r){const e=[];if(typeof navigator<"u"){const{languages:t,userLanguage:n,language:i}=navigator;if(t)for(let s=0;s<t.length;s++)e.push(t[s]);n&&e.push(n),i&&e.push(i)}return e.length>0?e:void 0}},Zn={name:"htmlTag",lookup(r){let{htmlTag:e}=r,t;const n=e||(typeof document<"u"?document.documentElement:null);return n&&typeof n.getAttribute=="function"&&(t=n.getAttribute("lang")),t}},er={name:"path",lookup(r){var i;let{lookupFromPathIndex:e}=r;if(typeof window>"u")return;const t=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(t)?(i=t[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},tr={name:"subdomain",lookup(r){var i,s;let{lookupFromSubdomainIndex:e}=r;const t=typeof e=="number"?e+1:1,n=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(n)return n[t]}};function nr(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}}class rr{constructor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,t)}init(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e||{languageUtils:{}},this.options=zn(t,this.options||{},nr()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Xn),this.addDetector(Wn),this.addDetector(Gn),this.addDetector(Qn),this.addDetector(Yn),this.addDetector(Zn),this.addDetector(er),this.addDetector(tr)}addDetector(e){return this.detectors[e.name]=e,this}detect(e){e||(e=this.options.order);let t=[];return e.forEach(n=>{if(this.detectors[n]){let i=this.detectors[n].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(t=t.concat(i))}}),t=t.map(n=>this.options.convertDetectedLanguage(n)),this.services.languageUtils.getBestMatchFromCodes?t:t.length>0?t[0]:null}cacheUserLanguage(e,t){t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach(n=>{this.detectors[n]&&this.detectors[n].cacheUserLanguage(e,this.options)}))}}rr.type="languageDetector";function Me(r){"@babel/helpers - typeof";return Me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(r)}function Nt(){return typeof XMLHttpRequest=="function"||(typeof XMLHttpRequest>"u"?"undefined":Me(XMLHttpRequest))==="object"}function ir(r){return!!r&&typeof r.then=="function"}function sr(r){return ir(r)?r:Promise.resolve(r)}function or(r){throw new Error('Could not dynamically require "'+r+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Be={exports:{}},ge={exports:{}},ft;function ar(){return ft||(ft=1,function(r,e){var t=typeof globalThis<"u"&&globalThis||typeof self<"u"&&self||typeof ae<"u"&&ae,n=function(){function s(){this.fetch=!1,this.DOMException=t.DOMException}return s.prototype=t,new s}();(function(s){(function(o){var a=typeof s<"u"&&s||typeof self<"u"&&self||typeof a<"u"&&a,u={searchParams:"URLSearchParams"in a,iterable:"Symbol"in a&&"iterator"in Symbol,blob:"FileReader"in a&&"Blob"in a&&function(){try{return new Blob,!0}catch{return!1}}(),formData:"FormData"in a,arrayBuffer:"ArrayBuffer"in a};function c(f){return f&&DataView.prototype.isPrototypeOf(f)}if(u.arrayBuffer)var h=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(f){return f&&h.indexOf(Object.prototype.toString.call(f))>-1};function l(f){if(typeof f!="string"&&(f=String(f)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(f)||f==="")throw new TypeError('Invalid character in header field name: "'+f+'"');return f.toLowerCase()}function v(f){return typeof f!="string"&&(f=String(f)),f}function m(f){var g={next:function(){var S=f.shift();return{done:S===void 0,value:S}}};return u.iterable&&(g[Symbol.iterator]=function(){return g}),g}function w(f){this.map={},f instanceof w?f.forEach(function(g,S){this.append(S,g)},this):Array.isArray(f)?f.forEach(function(g){this.append(g[0],g[1])},this):f&&Object.getOwnPropertyNames(f).forEach(function(g){this.append(g,f[g])},this)}w.prototype.append=function(f,g){f=l(f),g=v(g);var S=this.map[f];this.map[f]=S?S+", "+g:g},w.prototype.delete=function(f){delete this.map[l(f)]},w.prototype.get=function(f){return f=l(f),this.has(f)?this.map[f]:null},w.prototype.has=function(f){return this.map.hasOwnProperty(l(f))},w.prototype.set=function(f,g){this.map[l(f)]=v(g)},w.prototype.forEach=function(f,g){for(var S in this.map)this.map.hasOwnProperty(S)&&f.call(g,this.map[S],S,this)},w.prototype.keys=function(){var f=[];return this.forEach(function(g,S){f.push(S)}),m(f)},w.prototype.values=function(){var f=[];return this.forEach(function(g){f.push(g)}),m(f)},w.prototype.entries=function(){var f=[];return this.forEach(function(g,S){f.push([S,g])}),m(f)},u.iterable&&(w.prototype[Symbol.iterator]=w.prototype.entries);function O(f){if(f.bodyUsed)return Promise.reject(new TypeError("Already read"));f.bodyUsed=!0}function L(f){return new Promise(function(g,S){f.onload=function(){g(f.result)},f.onerror=function(){S(f.error)}})}function P(f){var g=new FileReader,S=L(g);return g.readAsArrayBuffer(f),S}function T(f){var g=new FileReader,S=L(g);return g.readAsText(f),S}function k(f){for(var g=new Uint8Array(f),S=new Array(g.length),p=0;p<g.length;p++)S[p]=String.fromCharCode(g[p]);return S.join("")}function j(f){if(f.slice)return f.slice(0);var g=new Uint8Array(f.byteLength);return g.set(new Uint8Array(f)),g.buffer}function E(){return this.bodyUsed=!1,this._initBody=function(f){this.bodyUsed=this.bodyUsed,this._bodyInit=f,f?typeof f=="string"?this._bodyText=f:u.blob&&Blob.prototype.isPrototypeOf(f)?this._bodyBlob=f:u.formData&&FormData.prototype.isPrototypeOf(f)?this._bodyFormData=f:u.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)?this._bodyText=f.toString():u.arrayBuffer&&u.blob&&c(f)?(this._bodyArrayBuffer=j(f.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):u.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(f)||d(f))?this._bodyArrayBuffer=j(f):this._bodyText=f=Object.prototype.toString.call(f):this._bodyText="",this.headers.get("content-type")||(typeof f=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):u.searchParams&&URLSearchParams.prototype.isPrototypeOf(f)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},u.blob&&(this.blob=function(){var f=O(this);if(f)return f;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var f=O(this);return f||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}else return this.blob().then(P)}),this.text=function(){var f=O(this);if(f)return f;if(this._bodyBlob)return T(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(k(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},u.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var x=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function F(f){var g=f.toUpperCase();return x.indexOf(g)>-1?g:f}function I(f,g){if(!(this instanceof I))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g=g||{};var S=g.body;if(f instanceof I){if(f.bodyUsed)throw new TypeError("Already read");this.url=f.url,this.credentials=f.credentials,g.headers||(this.headers=new w(f.headers)),this.method=f.method,this.mode=f.mode,this.signal=f.signal,!S&&f._bodyInit!=null&&(S=f._bodyInit,f.bodyUsed=!0)}else this.url=String(f);if(this.credentials=g.credentials||this.credentials||"same-origin",(g.headers||!this.headers)&&(this.headers=new w(g.headers)),this.method=F(g.method||this.method||"GET"),this.mode=g.mode||this.mode||null,this.signal=g.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&S)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(S),(this.method==="GET"||this.method==="HEAD")&&(g.cache==="no-store"||g.cache==="no-cache")){var p=/([?&])_=[^&]*/;if(p.test(this.url))this.url=this.url.replace(p,"$1_="+new Date().getTime());else{var b=/\?/;this.url+=(b.test(this.url)?"&":"?")+"_="+new Date().getTime()}}}I.prototype.clone=function(){return new I(this,{body:this._bodyInit})};function X(f){var g=new FormData;return f.trim().split("&").forEach(function(S){if(S){var p=S.split("="),b=p.shift().replace(/\+/g," "),y=p.join("=").replace(/\+/g," ");g.append(decodeURIComponent(b),decodeURIComponent(y))}}),g}function H(f){var g=new w,S=f.replace(/\r?\n[\t ]+/g," ");return S.split("\r").map(function(p){return p.indexOf(`
`)===0?p.substr(1,p.length):p}).forEach(function(p){var b=p.split(":"),y=b.shift().trim();if(y){var R=b.join(":").trim();g.append(y,R)}}),g}E.call(I.prototype);function $(f,g){if(!(this instanceof $))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');g||(g={}),this.type="default",this.status=g.status===void 0?200:g.status,this.ok=this.status>=200&&this.status<300,this.statusText=g.statusText===void 0?"":""+g.statusText,this.headers=new w(g.headers),this.url=g.url||"",this._initBody(f)}E.call($.prototype),$.prototype.clone=function(){return new $(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new w(this.headers),url:this.url})},$.error=function(){var f=new $(null,{status:0,statusText:""});return f.type="error",f};var K=[301,302,303,307,308];$.redirect=function(f,g){if(K.indexOf(g)===-1)throw new RangeError("Invalid status code");return new $(null,{status:g,headers:{location:f}})},o.DOMException=a.DOMException;try{new o.DOMException}catch{o.DOMException=function(g,S){this.message=g,this.name=S;var p=Error(g);this.stack=p.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function _(f,g){return new Promise(function(S,p){var b=new I(f,g);if(b.signal&&b.signal.aborted)return p(new o.DOMException("Aborted","AbortError"));var y=new XMLHttpRequest;function R(){y.abort()}y.onload=function(){var N={status:y.status,statusText:y.statusText,headers:H(y.getAllResponseHeaders()||"")};N.url="responseURL"in y?y.responseURL:N.headers.get("X-Request-URL");var U="response"in y?y.response:y.responseText;setTimeout(function(){S(new $(U,N))},0)},y.onerror=function(){setTimeout(function(){p(new TypeError("Network request failed"))},0)},y.ontimeout=function(){setTimeout(function(){p(new TypeError("Network request failed"))},0)},y.onabort=function(){setTimeout(function(){p(new o.DOMException("Aborted","AbortError"))},0)};function C(N){try{return N===""&&a.location.href?a.location.href:N}catch{return N}}y.open(b.method,C(b.url),!0),b.credentials==="include"?y.withCredentials=!0:b.credentials==="omit"&&(y.withCredentials=!1),"responseType"in y&&(u.blob?y.responseType="blob":u.arrayBuffer&&b.headers.get("Content-Type")&&b.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(y.responseType="arraybuffer")),g&&typeof g.headers=="object"&&!(g.headers instanceof w)?Object.getOwnPropertyNames(g.headers).forEach(function(N){y.setRequestHeader(N,v(g.headers[N]))}):b.headers.forEach(function(N,U){y.setRequestHeader(U,N)}),b.signal&&(b.signal.addEventListener("abort",R),y.onreadystatechange=function(){y.readyState===4&&b.signal.removeEventListener("abort",R)}),y.send(typeof b._bodyInit>"u"?null:b._bodyInit)})}return _.polyfill=!0,a.fetch||(a.fetch=_,a.Headers=w,a.Request=I,a.Response=$),o.Headers=w,o.Request=I,o.Response=$,o.fetch=_,o})({})})(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var i=t.fetch?t:n;e=i.fetch,e.default=i.fetch,e.fetch=i.fetch,e.Headers=i.Headers,e.Request=i.Request,e.Response=i.Response,r.exports=e}(ge,ge.exports)),ge.exports}(function(r,e){var t;if(typeof fetch=="function"&&(typeof ae<"u"&&ae.fetch?t=ae.fetch:typeof window<"u"&&window.fetch?t=window.fetch:t=fetch),typeof or<"u"&&typeof window>"u"){var n=t||ar();n.default&&(n=n.default),e.default=n,r.exports=e.default}})(Be,Be.exports);var $t=Be.exports;const Dt=Ut($t),ct=_t({__proto__:null,default:Dt},[$t]);function ht(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function dt(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ht(Object(t),!0).forEach(function(n){ur(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):ht(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function ur(r,e,t){return e=lr(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function lr(r){var e=fr(r,"string");return Q(e)=="symbol"?e:e+""}function fr(r,e){if(Q(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(Q(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Q(r){"@babel/helpers - typeof";return Q=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Q(r)}var z;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?z=global.fetch:typeof window<"u"&&window.fetch?z=window.fetch:z=fetch);var ce;Nt()&&(typeof global<"u"&&global.XMLHttpRequest?ce=global.XMLHttpRequest:typeof window<"u"&&window.XMLHttpRequest&&(ce=window.XMLHttpRequest));var Oe;typeof ActiveXObject=="function"&&(typeof global<"u"&&global.ActiveXObject?Oe=global.ActiveXObject:typeof window<"u"&&window.ActiveXObject&&(Oe=window.ActiveXObject));!z&&ct&&!ce&&!Oe&&(z=Dt||ct);typeof z!="function"&&(z=void 0);var He=function(e,t){if(t&&Q(t)==="object"){var n="";for(var i in t)n+="&"+encodeURIComponent(i)+"="+encodeURIComponent(t[i]);if(!n)return e;e=e+(e.indexOf("?")!==-1?"&":"?")+n.slice(1)}return e},pt=function(e,t,n,i){var s=function(u){if(!u.ok)return n(u.statusText||"Error",{status:u.status});u.text().then(function(c){n(null,{status:u.status,data:c})}).catch(n)};if(i){var o=i(e,t);if(o instanceof Promise){o.then(s).catch(n);return}}typeof fetch=="function"?fetch(e,t).then(s).catch(n):z(e,t).then(s).catch(n)},gt=!1,cr=function(e,t,n,i){e.queryStringParams&&(t=He(t,e.queryStringParams));var s=dt({},typeof e.customHeaders=="function"?e.customHeaders():e.customHeaders);typeof window>"u"&&typeof global<"u"&&typeof global.process<"u"&&global.process.versions&&global.process.versions.node&&(s["User-Agent"]="i18next-http-backend (node/".concat(global.process.version,"; ").concat(global.process.platform," ").concat(global.process.arch,")")),n&&(s["Content-Type"]="application/json");var o=typeof e.requestOptions=="function"?e.requestOptions(n):e.requestOptions,a=dt({method:n?"POST":"GET",body:n?e.stringify(n):void 0,headers:s},gt?{}:o),u=typeof e.alternateFetch=="function"&&e.alternateFetch.length>=1?e.alternateFetch:void 0;try{pt(t,a,i,u)}catch(c){if(!o||Object.keys(o).length===0||!c.message||c.message.indexOf("not implemented")<0)return i(c);try{Object.keys(o).forEach(function(h){delete a[h]}),pt(t,a,i,u),gt=!0}catch(h){i(h)}}},hr=function(e,t,n,i){n&&Q(n)==="object"&&(n=He("",n).slice(1)),e.queryStringParams&&(t=He(t,e.queryStringParams));try{var s;ce?s=new ce:s=new Oe("MSXML2.XMLHTTP.3.0"),s.open(n?"POST":"GET",t,1),e.crossDomain||s.setRequestHeader("X-Requested-With","XMLHttpRequest"),s.withCredentials=!!e.withCredentials,n&&s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.overrideMimeType&&s.overrideMimeType("application/json");var o=e.customHeaders;if(o=typeof o=="function"?o():o,o)for(var a in o)s.setRequestHeader(a,o[a]);s.onreadystatechange=function(){s.readyState>3&&i(s.status>=400?s.statusText:null,{status:s.status,data:s.responseText})},s.send(n)}catch(u){console&&console.log(u)}},dr=function(e,t,n,i){if(typeof n=="function"&&(i=n,n=void 0),i=i||function(){},z&&t.indexOf("file:")!==0)return cr(e,t,n,i);if(Nt()||typeof ActiveXObject=="function")return hr(e,t,n,i);i(new Error("No fetch and no xhr implementation found!"))};function ne(r){"@babel/helpers - typeof";return ne=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(r)}function mt(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function De(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(t),!0).forEach(function(n){It(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):mt(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function pr(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function gr(r,e){for(var t=0;t<e.length;t++){var n=e[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(r,Ft(n.key),n)}}function mr(r,e,t){return e&&gr(r.prototype,e),Object.defineProperty(r,"prototype",{writable:!1}),r}function It(r,e,t){return e=Ft(e),e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Ft(r){var e=yr(r,"string");return ne(e)=="symbol"?e:e+""}function yr(r,e){if(ne(r)!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var n=t.call(r,e||"default");if(ne(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}var br=function(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"/locales/add/{{lng}}/{{ns}}",parse:function(t){return JSON.parse(t)},stringify:JSON.stringify,parsePayload:function(t,n,i){return It({},n,i||"")},parseLoadPayload:function(t,n){},request:dr,reloadInterval:typeof window<"u"?!1:60*60*1e3,customHeaders:{},queryStringParams:{},crossDomain:!1,withCredentials:!1,overrideMimeType:!1,requestOptions:{mode:"cors",credentials:"same-origin",cache:"default"}}},vr=function(){function r(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};pr(this,r),this.services=e,this.options=t,this.allOptions=n,this.type="backend",this.init(e,t,n)}return mr(r,[{key:"init",value:function(t){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(this.services=t,this.options=De(De(De({},br()),this.options||{}),i),this.allOptions=s,this.services&&this.options.reloadInterval){var o=setInterval(function(){return n.reload()},this.options.reloadInterval);ne(o)==="object"&&typeof o.unref=="function"&&o.unref()}}},{key:"readMulti",value:function(t,n,i){this._readAny(t,t,n,n,i)}},{key:"read",value:function(t,n,i){this._readAny([t],t,[n],n,i)}},{key:"_readAny",value:function(t,n,i,s,o){var a=this,u=this.options.loadPath;typeof this.options.loadPath=="function"&&(u=this.options.loadPath(t,i)),u=sr(u),u.then(function(c){if(!c)return o(null,{});var h=a.services.interpolator.interpolate(c,{lng:t.join("+"),ns:i.join("+")});a.loadUrl(h,o,n,s)})}},{key:"loadUrl",value:function(t,n,i,s){var o=this,a=typeof i=="string"?[i]:i,u=typeof s=="string"?[s]:s,c=this.options.parseLoadPayload(a,u);this.options.request(this.options,t,c,function(h,d){if(d&&(d.status>=500&&d.status<600||!d.status))return n("failed loading "+t+"; status code: "+d.status,!0);if(d&&d.status>=400&&d.status<500)return n("failed loading "+t+"; status code: "+d.status,!1);if(!d&&h&&h.message&&h.message.indexOf("Failed to fetch")>-1)return n("failed loading "+t+": "+h.message,!0);if(h)return n(h,!1);var l,v;try{typeof d.data=="string"?l=o.options.parse(d.data,i,s):l=d.data}catch{v="failed parsing "+t+" to json"}if(v)return n(v,!1);n(null,l)})}},{key:"create",value:function(t,n,i,s,o){var a=this;if(this.options.addPath){typeof t=="string"&&(t=[t]);var u=this.options.parsePayload(n,i,s),c=0,h=[],d=[];t.forEach(function(l){var v=a.options.addPath;typeof a.options.addPath=="function"&&(v=a.options.addPath(l,n));var m=a.services.interpolator.interpolate(v,{lng:l,ns:n});a.options.request(a.options,m,u,function(w,O){c+=1,h.push(w),d.push(O),c===t.length&&typeof o=="function"&&o(h,d)})})}}},{key:"reload",value:function(){var t=this,n=this.services,i=n.backendConnector,s=n.languageUtils,o=n.logger,a=i.language;if(!(a&&a.toLowerCase()==="cimode")){var u=[],c=function(d){var l=s.toResolveHierarchy(d);l.forEach(function(v){u.indexOf(v)<0&&u.push(v)})};c(a),this.allOptions.preload&&this.allOptions.preload.forEach(function(h){return c(h)}),u.forEach(function(h){t.allOptions.ns.forEach(function(d){i.read(h,d,"read",null,null,function(l,v){l&&o.warn("loading namespace ".concat(d," for language ").concat(h," failed"),l),!l&&v&&o.log("loaded namespace ".concat(d," for language ").concat(h),v),i.loaded("".concat(h,"|").concat(d),l,v)})})})}}}])}();vr.type="backend";export{jr as A,Cr as B,Rr as C,Rt as D,Ut as E,Lr as F,Hr as G,qr as H,Or as I,Pr as J,an as K,Sr as L,Ar as M,D as N,vr as O,rr as P,Vr as Q,Et as R,Nr as W,Ke as _,Er as a,Ir as b,kr as c,Fr as d,_r as e,q as f,J as g,$r as h,cn as i,Tr as j,Mr as k,Ur as l,Dr as m,Br as n,gn as o,pn as p,B as q,me as r,Ge as s,Ie as t,qe as u,G as v,Ne as w,Ee as x,M as y,xr as z};