diff --git a/dist/out.js b/dist/out.js index 2a843f09e..93644eb06 100644 --- a/dist/out.js +++ b/dist/out.js @@ -1,6 +1,6 @@ "use strict";(()=>{var a1=Object.create;var Xc=Object.defineProperty,s1=Object.defineProperties,o1=Object.getOwnPropertyDescriptor,i1=Object.getOwnPropertyDescriptors,l1=Object.getOwnPropertyNames,zi=Object.getOwnPropertySymbols,c1=Object.getPrototypeOf,Zc=Object.prototype.hasOwnProperty,Ip=Object.prototype.propertyIsEnumerable;var Rp=(t,r,n)=>r in t?Xc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n,G=(t,r)=>{for(var n in r||(r={}))Zc.call(r,n)&&Rp(t,n,r[n]);if(zi)for(var n of zi(r))Ip.call(r,n)&&Rp(t,n,r[n]);return t},fe=(t,r)=>s1(t,i1(r));var Po=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,n)=>(typeof require<"u"?require:r)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Np=(t,r)=>{var n={};for(var a in t)Zc.call(t,a)&&r.indexOf(a)<0&&(n[a]=t[a]);if(t!=null&&zi)for(var a of zi(t))r.indexOf(a)<0&&Ip.call(t,a)&&(n[a]=t[a]);return n};var Pa=(t,r)=>()=>(r||t((r={exports:{}}).exports,r),r.exports);var u1=(t,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let s of l1(r))!Zc.call(t,s)&&s!==n&&Xc(t,s,{get:()=>r[s],enumerable:!(a=o1(r,s))||a.enumerable});return t};var Hr=(t,r,n)=>(n=t!=null?a1(c1(t)):{},u1(r||!t||!t.__esModule?Xc(n,"default",{value:t,enumerable:!0}):n,t));var Yc=(t,r,n)=>{if(!r.has(t))throw TypeError("Cannot "+n)};var he=(t,r,n)=>(Yc(t,r,"read from private field"),n?n.call(t):r.get(t)),qt=(t,r,n)=>{if(r.has(t))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(t):r.set(t,n)},Zt=(t,r,n,a)=>(Yc(t,r,"write to private field"),a?a.call(t,n):r.set(t,n),n);var Ki=(t,r,n)=>(Yc(t,r,"access private method"),n);var $p=Pa((vw,_p)=>{"use strict";_p.exports=function(t,r,n){if(t==null||r==null)return t;var a=String(t),s=typeof r=="number"?r:parseInt(r,10);if(isNaN(s)||!isFinite(s))return a;var o=a.length;if(o>=s)return a;var c=n==null?"":String(n);c===""&&(c=" ");for(var p=s-o;c.lengthp?c.substr(0,p):c;return a+f}});var eu=Pa((ww,Yi)=>{var Jc=function(){var t=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",a={};function s(c,p){if(!a[c]){a[c]={};for(var f=0;f>>8,f[g*2+1]=b%256}return f},decompressFromUint8Array:function(c){if(c==null)return o.decompress(c);for(var p=new Array(c.length/2),f=0,g=p.length;f>1}else{for(h=1,g=0;g>1}$--,$==0&&($=Math.pow(2,E),E++),delete y[D]}else for(h=b[D],g=0;g>1;$--,$==0&&($=Math.pow(2,E),E++),b[x]=L++,D=String(C)}if(D!==""){if(Object.prototype.hasOwnProperty.call(y,D)){if(D.charCodeAt(0)<256){for(g=0;g>1}else{for(h=1,g=0;g>1}$--,$==0&&($=Math.pow(2,E),E++),delete y[D]}else for(h=b[D],g=0;g>1;$--,$==0&&($=Math.pow(2,E),E++)}for(h=2,g=0;g>1;for(;;)if(I=I<<1,N==p-1){H.push(f(I));break}else N++;return H.join("")},decompress:function(c){return c==null?"":c==""?null:o._decompress(c.length,32768,function(p){return c.charCodeAt(p)})},_decompress:function(c,p,f){var g=[],h,b=4,y=4,C=3,x="",D=[],$,L,E,H,I,N,k,A={val:f(0),position:p,index:1};for($=0;$<3;$+=1)g[$]=$;for(E=0,I=Math.pow(2,2),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;switch(h=E){case 0:for(E=0,I=Math.pow(2,8),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;k=t(E);break;case 1:for(E=0,I=Math.pow(2,16),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;k=t(E);break;case 2:return""}for(g[3]=k,L=k,D.push(k);;){if(A.index>c)return"";for(E=0,I=Math.pow(2,C),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;switch(k=E){case 0:for(E=0,I=Math.pow(2,8),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;g[y++]=t(E),k=y-1,b--;break;case 1:for(E=0,I=Math.pow(2,16),N=1;N!=I;)H=A.val&A.position,A.position>>=1,A.position==0&&(A.position=p,A.val=f(A.index++)),E|=(H>0?1:0)*N,N<<=1;g[y++]=t(E),k=y-1,b--;break;case 2:return D.join("")}if(b==0&&(b=Math.pow(2,C),C++),g[k])x=g[k];else if(k===y)x=L+L.charAt(0);else return null;D.push(x),g[y++]=L+x.charAt(0),b--,L=x,b==0&&(b=Math.pow(2,C),C++)}}};return o}();typeof define=="function"&&define.amd?define(function(){return Jc}):typeof Yi<"u"&&Yi!=null?Yi.exports=Jc:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return Jc})});var mf=Pa((Mx,su)=>{"use strict";var V1=Object.prototype.hasOwnProperty,jt="~";function Uo(){}Object.create&&(Uo.prototype=Object.create(null),new Uo().__proto__||(jt=!1));function W1(t,r,n){this.fn=t,this.context=r,this.once=n||!1}function gf(t,r,n,a,s){if(typeof n!="function")throw new TypeError("The listener must be a function");var o=new W1(n,a||t,s),c=jt?jt+r:r;return t._events[c]?t._events[c].fn?t._events[c]=[t._events[c],o]:t._events[c].push(o):(t._events[c]=o,t._eventsCount++),t}function il(t,r){--t._eventsCount===0?t._events=new Uo:delete t._events[r]}function Gt(){this._events=new Uo,this._eventsCount=0}Gt.prototype.eventNames=function(){var r=[],n,a;if(this._eventsCount===0)return r;for(a in n=this._events)V1.call(n,a)&&r.push(jt?a.slice(1):a);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(n)):r};Gt.prototype.listeners=function(r){var n=jt?jt+r:r,a=this._events[n];if(!a)return[];if(a.fn)return[a.fn];for(var s=0,o=a.length,c=new Array(o);s{(function(r,n){typeof Bo=="object"&&typeof ou=="object"?ou.exports=n():typeof define=="function"&&define.amd?define([],n):typeof Bo=="object"?Bo.ClipboardJS=n():r.ClipboardJS=n()})(Bo,function(){return function(){var t={686:function(a,s,o){"use strict";o.d(s,{default:function(){return Nt}});var c=o(279),p=o.n(c),f=o(370),g=o.n(f),h=o(817),b=o.n(h);function y(ve){try{return document.execCommand(ve)}catch(ue){return!1}}var C=function(ue){var le=b()(ue);return y("cut"),le},x=C;function D(ve){var ue=document.documentElement.getAttribute("dir")==="rtl",le=document.createElement("textarea");le.style.fontSize="12pt",le.style.border="0",le.style.padding="0",le.style.margin="0",le.style.position="absolute",le.style[ue?"right":"left"]="-9999px";var be=window.pageYOffset||document.documentElement.scrollTop;return le.style.top="".concat(be,"px"),le.setAttribute("readonly",""),le.value=ve,le}var $=function(ue,le){var be=D(ue);le.container.appendChild(be);var me=b()(be);return y("copy"),be.remove(),me},L=function(ue){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body},be="";return typeof ue=="string"?be=$(ue,le):ue instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(ue==null?void 0:ue.type)?be=$(ue.value,le):(be=b()(ue),y("copy")),be},E=L;function H(ve){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?H=function(le){return typeof le}:H=function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},H(ve)}var I=function(){var ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=ue.action,be=le===void 0?"copy":le,me=ue.container,ke=ue.target,Ye=ue.text;if(be!=="copy"&&be!=="cut")throw new Error('Invalid "action" value, use either "copy" or "cut"');if(ke!==void 0)if(ke&&H(ke)==="object"&&ke.nodeType===1){if(be==="copy"&&ke.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if(be==="cut"&&(ke.hasAttribute("readonly")||ke.hasAttribute("disabled")))throw new Error(`Invalid "target" attribute. You can't cut text from elements with "readonly" or "disabled" attributes`)}else throw new Error('Invalid "target" value, use a valid Element');if(Ye)return E(Ye,{container:me});if(ke)return be==="cut"?x(ke):E(ke,{container:me})},N=I;function k(ve){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?k=function(le){return typeof le}:k=function(le){return le&&typeof Symbol=="function"&&le.constructor===Symbol&&le!==Symbol.prototype?"symbol":typeof le},k(ve)}function A(ve,ue){if(!(ve instanceof ue))throw new TypeError("Cannot call a class as a function")}function Q(ve,ue){for(var le=0;le"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(ve){return!1}}function ht(ve){return ht=Object.setPrototypeOf?Object.getPrototypeOf:function(le){return le.__proto__||Object.getPrototypeOf(le)},ht(ve)}function Ot(ve,ue){var le="data-clipboard-".concat(ve);if(ue.hasAttribute(le))return ue.getAttribute(le)}var xt=function(ve){M(le,ve);var ue=ae(le);function le(be,me){var ke;return A(this,le),ke=ue.call(this),ke.resolveOptions(me),ke.listenClick(be),ke}return J(le,[{key:"resolveOptions",value:function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.action=typeof me.action=="function"?me.action:this.defaultAction,this.target=typeof me.target=="function"?me.target:this.defaultTarget,this.text=typeof me.text=="function"?me.text:this.defaultText,this.container=k(me.container)==="object"?me.container:document.body}},{key:"listenClick",value:function(me){var ke=this;this.listener=g()(me,"click",function(Ye){return ke.onClick(Ye)})}},{key:"onClick",value:function(me){var ke=me.delegateTarget||me.currentTarget,Ye=this.action(ke)||"copy",O=N({action:Ye,container:this.container,target:this.target(ke),text:this.text(ke)});this.emit(O?"success":"error",{action:Ye,text:O,trigger:ke,clearSelection:function(){ke&&ke.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(me){return Ot("action",me)}},{key:"defaultTarget",value:function(me){var ke=Ot("target",me);if(ke)return document.querySelector(ke)}},{key:"defaultText",value:function(me){return Ot("text",me)}},{key:"destroy",value:function(){this.listener.destroy()}}],[{key:"copy",value:function(me){var ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{container:document.body};return E(me,ke)}},{key:"cut",value:function(me){return x(me)}},{key:"isSupported",value:function(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:["copy","cut"],ke=typeof me=="string"?[me]:me,Ye=!!document.queryCommandSupported;return ke.forEach(function(O){Ye=Ye&&!!document.queryCommandSupported(O)}),Ye}}]),le}(p()),Nt=xt},828:function(a){var s=9;if(typeof Element<"u"&&!Element.prototype.matches){var o=Element.prototype;o.matches=o.matchesSelector||o.mozMatchesSelector||o.msMatchesSelector||o.oMatchesSelector||o.webkitMatchesSelector}function c(p,f){for(;p&&p.nodeType!==s;){if(typeof p.matches=="function"&&p.matches(f))return p;p=p.parentNode}}a.exports=c},438:function(a,s,o){var c=o(828);function p(h,b,y,C,x){var D=g.apply(this,arguments);return h.addEventListener(y,D,x),{destroy:function(){h.removeEventListener(y,D,x)}}}function f(h,b,y,C,x){return typeof h.addEventListener=="function"?p.apply(null,arguments):typeof y=="function"?p.bind(null,document).apply(null,arguments):(typeof h=="string"&&(h=document.querySelectorAll(h)),Array.prototype.map.call(h,function(D){return p(D,b,y,C,x)}))}function g(h,b,y,C){return function(x){x.delegateTarget=c(x.target,b),x.delegateTarget&&C.call(h,x)}}a.exports=f},879:function(a,s){s.node=function(o){return o!==void 0&&o instanceof HTMLElement&&o.nodeType===1},s.nodeList=function(o){var c=Object.prototype.toString.call(o);return o!==void 0&&(c==="[object NodeList]"||c==="[object HTMLCollection]")&&"length"in o&&(o.length===0||s.node(o[0]))},s.string=function(o){return typeof o=="string"||o instanceof String},s.fn=function(o){var c=Object.prototype.toString.call(o);return c==="[object Function]"}},370:function(a,s,o){var c=o(879),p=o(438);function f(y,C,x){if(!y&&!C&&!x)throw new Error("Missing required arguments");if(!c.string(C))throw new TypeError("Second argument must be a String");if(!c.fn(x))throw new TypeError("Third argument must be a Function");if(c.node(y))return g(y,C,x);if(c.nodeList(y))return h(y,C,x);if(c.string(y))return b(y,C,x);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function g(y,C,x){return y.addEventListener(C,x),{destroy:function(){y.removeEventListener(C,x)}}}function h(y,C,x){return Array.prototype.forEach.call(y,function(D){D.addEventListener(C,x)}),{destroy:function(){Array.prototype.forEach.call(y,function(D){D.removeEventListener(C,x)})}}}function b(y,C,x){return p(document.body,y,C,x)}a.exports=f},817:function(a){function s(o){var c;if(o.nodeName==="SELECT")o.focus(),c=o.value;else if(o.nodeName==="INPUT"||o.nodeName==="TEXTAREA"){var p=o.hasAttribute("readonly");p||o.setAttribute("readonly",""),o.select(),o.setSelectionRange(0,o.value.length),p||o.removeAttribute("readonly"),c=o.value}else{o.hasAttribute("contenteditable")&&o.focus();var f=window.getSelection(),g=document.createRange();g.selectNodeContents(o),f.removeAllRanges(),f.addRange(g),c=f.toString()}return c}a.exports=s},279:function(a){function s(){}s.prototype={on:function(o,c,p){var f=this.e||(this.e={});return(f[o]||(f[o]=[])).push({fn:c,ctx:p}),this},once:function(o,c,p){var f=this;function g(){f.off(o,g),c.apply(p,arguments)}return g._=c,this.on(o,g,p)},emit:function(o){var c=[].slice.call(arguments,1),p=((this.e||(this.e={}))[o]||[]).slice(),f=0,g=p.length;for(f;f{(function(t){if(typeof bf=="object"&&typeof lu<"u")lu.exports=t();else if(typeof define=="function"&&define.amd)define([],t);else{var r;typeof window<"u"?r=window:typeof global<"u"?r=global:typeof self<"u"?r=self:r=this,r.localforage=t()}})(function(){var t,r,n;return function a(s,o,c){function p(h,b){if(!o[h]){if(!s[h]){var y=typeof Po=="function"&&Po;if(!b&&y)return y(h,!0);if(f)return f(h,!0);var C=new Error("Cannot find module '"+h+"'");throw C.code="MODULE_NOT_FOUND",C}var x=o[h]={exports:{}};s[h][0].call(x.exports,function(D){var $=s[h][1][D];return p($||D)},x,x.exports,a,s,o,c)}return o[h].exports}for(var f=typeof Po=="function"&&Po,g=0;g"u"&&a(3);var y=Promise;function C(w,P){P&&w.then(function(S){P(null,S)},function(S){P(S)})}function x(w,P,S){typeof P=="function"&&w.then(P),typeof S=="function"&&w.catch(S)}function D(w){return typeof w!="string"&&(console.warn(w+" used as a key, but it is not a string."),w=String(w)),w}function $(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var L="local-forage-detect-blob-support",E=void 0,H={},I=Object.prototype.toString,N="readonly",k="readwrite";function A(w){for(var P=w.length,S=new ArrayBuffer(P),R=new Uint8Array(S),_=0;_=43)}}).catch(function(){return!1})}function J(w){return typeof E=="boolean"?y.resolve(E):Q(w).then(function(P){return E=P,E})}function M(w){var P=H[w.name],S={};S.promise=new y(function(R,_){S.resolve=R,S.reject=_}),P.deferredOperations.push(S),P.dbReady?P.dbReady=P.dbReady.then(function(){return S.promise}):P.dbReady=S.promise}function j(w){var P=H[w.name],S=P.deferredOperations.pop();if(S)return S.resolve(),S.promise}function ae(w,P){var S=H[w.name],R=S.deferredOperations.pop();if(R)return R.reject(P),R.promise}function ge(w,P){return new y(function(S,R){if(H[w.name]=H[w.name]||be(),w.db)if(P)M(w),w.db.close();else return S(w.db);var _=[w.name];P&&_.push(w.version);var U=g.open.apply(g,_);P&&(U.onupgradeneeded=function(q){var W=U.result;try{W.createObjectStore(w.storeName),q.oldVersion<=1&&W.createObjectStore(L)}catch(Z){if(Z.name==="ConstraintError")console.warn('The database "'+w.name+'" has been upgraded from version '+q.oldVersion+" to version "+q.newVersion+', but the storage "'+w.storeName+'" already exists.');else throw Z}}),U.onerror=function(q){q.preventDefault(),R(U.error)},U.onsuccess=function(){var q=U.result;q.onversionchange=function(W){W.target.close()},S(q),j(w)}})}function Je(w){return ge(w,!1)}function ut(w){return ge(w,!0)}function ht(w,P){if(!w.db)return!0;var S=!w.db.objectStoreNames.contains(w.storeName),R=w.versionw.db.version;if(R&&(w.version!==P&&console.warn('The database "'+w.name+`" can't be downgraded from version `+w.db.version+" to version "+w.version+"."),w.version=w.db.version),_||S){if(S){var U=w.db.version+1;U>w.version&&(w.version=U)}return!0}return!1}function Ot(w){return new y(function(P,S){var R=new FileReader;R.onerror=S,R.onloadend=function(_){var U=btoa(_.target.result||"");P({__local_forage_encoded_blob:!0,data:U,type:w.type})},R.readAsBinaryString(w)})}function xt(w){var P=A(atob(w.data));return b([P],{type:w.type})}function Nt(w){return w&&w.__local_forage_encoded_blob}function ve(w){var P=this,S=P._initReady().then(function(){var R=H[P._dbInfo.name];if(R&&R.dbReady)return R.dbReady});return x(S,w,w),S}function ue(w){M(w);for(var P=H[w.name],S=P.forages,R=0;R0&&(!w.db||U.name==="InvalidStateError"||U.name==="NotFoundError"))return y.resolve().then(function(){if(!w.db||U.name==="NotFoundError"&&!w.db.objectStoreNames.contains(w.storeName)&&w.version<=w.db.version)return w.db&&(w.version=w.db.version+1),ut(w)}).then(function(){return ue(w).then(function(){le(w,P,S,R-1)})}).catch(S);S(U)}}function be(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function me(w){var P=this,S={db:null};if(w)for(var R in w)S[R]=w[R];var _=H[S.name];_||(_=be(),H[S.name]=_),_.forages.push(P),P._initReady||(P._initReady=P.ready,P.ready=ve);var U=[];function q(){return y.resolve()}for(var W=0;W<_.forages.length;W++){var Z=_.forages[W];Z!==P&&U.push(Z._initReady().catch(q))}var Y=_.forages.slice(0);return y.all(U).then(function(){return S.db=_.db,Je(S)}).then(function(ee){return S.db=ee,ht(S,P._defaultConfig.version)?ut(S):ee}).then(function(ee){S.db=_.db=ee,P._dbInfo=S;for(var de=0;de>4,ee[_++]=(q&15)<<4|W>>2,ee[_++]=(W&3)<<6|Z&63;return Y}function Ts(w){var P=new Uint8Array(w),S="",R;for(R=0;R>2],S+=$r[(P[R]&3)<<4|P[R+1]>>4],S+=$r[(P[R+1]&15)<<2|P[R+2]>>6],S+=$r[P[R+2]&63];return P.length%3===2?S=S.substring(0,S.length-1)+"=":P.length%3===1&&(S=S.substring(0,S.length-2)+"=="),S}function Fc(w,P){var S="";if(w&&(S=Mo.call(w)),w&&(S==="[object ArrayBuffer]"||w.buffer&&Mo.call(w.buffer)==="[object ArrayBuffer]")){var R,_=Ma;w instanceof ArrayBuffer?(R=w,_+=xs):(R=w.buffer,S==="[object Int8Array]"?_+=Fi:S==="[object Uint8Array]"?_+=Qi:S==="[object Uint8ClampedArray]"?_+=qi:S==="[object Int16Array]"?_+=ji:S==="[object Uint16Array]"?_+=Ss:S==="[object Int32Array]"?_+=Ms:S==="[object Uint32Array]"?_+=Sa:S==="[object Float32Array]"?_+=Ta:S==="[object Float64Array]"?_+=xo:P(new Error("Failed to get type for BinaryArray"))),P(_+Ts(R))}else if(S==="[object Blob]"){var U=new FileReader;U.onload=function(){var q=Hc+w.type+"~"+Ts(this.result);P(Ma+wo+q)},U.readAsArrayBuffer(w)}else try{P(JSON.stringify(w))}catch(q){console.error("Couldn't convert value into a JSON string: ",w),P(null,q)}}function Qc(w){if(w.substring(0,Xt)!==Ma)return JSON.parse(w);var P=w.substring(ka),S=w.substring(Xt,ka),R;if(S===wo&&Hi.test(P)){var _=P.match(Hi);R=_[1],P=P.substring(_[0].length)}var U=La(P);switch(S){case xs:return U;case wo:return b([U],{type:R});case Fi:return new Int8Array(U);case Qi:return new Uint8Array(U);case qi:return new Uint8ClampedArray(U);case ji:return new Int16Array(U);case Ss:return new Uint16Array(U);case Ms:return new Int32Array(U);case Sa:return new Uint32Array(U);case Ta:return new Float32Array(U);case xo:return new Float64Array(U);default:throw new Error("Unkown type: "+S)}}var ks={serialize:Fc,deserialize:Qc,stringToBuffer:La,bufferToString:Ts};function Vi(w,P,S,R){w.executeSql("CREATE TABLE IF NOT EXISTS "+P.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],S,R)}function qc(w){var P=this,S={db:null};if(w)for(var R in w)S[R]=typeof w[R]!="string"?w[R].toString():w[R];var _=new y(function(U,q){try{S.db=openDatabase(S.name,String(S.version),S.description,S.size)}catch(W){return q(W)}S.db.transaction(function(W){Vi(W,S,function(){P._dbInfo=S,U()},function(Z,Y){q(Y)})},q)});return S.serializer=ks,_}function Dr(w,P,S,R,_,U){w.executeSql(S,R,_,function(q,W){W.code===W.SYNTAX_ERR?q.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[P.storeName],function(Z,Y){Y.rows.length?U(Z,W):Vi(Z,P,function(){Z.executeSql(S,R,_,U)},U)},U):U(q,W)},U)}function So(w,P){var S=this;w=D(w);var R=new y(function(_,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(W){Dr(W,q,"SELECT * FROM "+q.storeName+" WHERE key = ? LIMIT 1",[w],function(Z,Y){var ee=Y.rows.length?Y.rows.item(0).value:null;ee&&(ee=q.serializer.deserialize(ee)),_(ee)},function(Z,Y){U(Y)})})}).catch(U)});return C(R,P),R}function To(w,P){var S=this,R=new y(function(_,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(W){Dr(W,q,"SELECT * FROM "+q.storeName,[],function(Z,Y){for(var ee=Y.rows,de=ee.length,Re=0;Re0){q(Aa.apply(_,[w,Z,S,R-1]));return}W(Re)}})})}).catch(W)});return C(U,S),U}function re(w,P,S){return Aa.apply(this,[w,P,S,1])}function V(w,P){var S=this;w=D(w);var R=new y(function(_,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(W){Dr(W,q,"DELETE FROM "+q.storeName+" WHERE key = ?",[w],function(){_()},function(Z,Y){U(Y)})})}).catch(U)});return C(R,P),R}function ne(w){var P=this,S=new y(function(R,_){P.ready().then(function(){var U=P._dbInfo;U.db.transaction(function(q){Dr(q,U,"DELETE FROM "+U.storeName,[],function(){R()},function(W,Z){_(Z)})})}).catch(_)});return C(S,w),S}function we(w){var P=this,S=new y(function(R,_){P.ready().then(function(){var U=P._dbInfo;U.db.transaction(function(q){Dr(q,U,"SELECT COUNT(key) as c FROM "+U.storeName,[],function(W,Z){var Y=Z.rows.item(0).c;R(Y)},function(W,Z){_(Z)})})}).catch(_)});return C(S,w),S}function Se(w,P){var S=this,R=new y(function(_,U){S.ready().then(function(){var q=S._dbInfo;q.db.transaction(function(W){Dr(W,q,"SELECT key FROM "+q.storeName+" WHERE id = ? LIMIT 1",[w+1],function(Z,Y){var ee=Y.rows.length?Y.rows.item(0).key:null;_(ee)},function(Z,Y){U(Y)})})}).catch(U)});return C(R,P),R}function qe(w){var P=this,S=new y(function(R,_){P.ready().then(function(){var U=P._dbInfo;U.db.transaction(function(q){Dr(q,U,"SELECT key FROM "+U.storeName,[],function(W,Z){for(var Y=[],ee=0;ee '__WebKitDatabaseInfoTable__'",[],function(_,U){for(var q=[],W=0;W0}function it(w){var P=this,S={};if(w)for(var R in w)S[R]=w[R];return S.keyPrefix=Gr(w,P._defaultConfig),Ue()?(P._dbInfo=S,S.serializer=ks,y.resolve()):y.reject()}function ft(w){var P=this,S=P.ready().then(function(){for(var R=P._dbInfo.keyPrefix,_=localStorage.length-1;_>=0;_--){var U=localStorage.key(_);U.indexOf(R)===0&&localStorage.removeItem(U)}});return C(S,w),S}function Qt(w,P){var S=this;w=D(w);var R=S.ready().then(function(){var _=S._dbInfo,U=localStorage.getItem(_.keyPrefix+w);return U&&(U=_.serializer.deserialize(U)),U});return C(R,P),R}function zn(w,P){var S=this,R=S.ready().then(function(){for(var _=S._dbInfo,U=_.keyPrefix,q=U.length,W=localStorage.length,Z=1,Y=0;Y=0;q--){var W=localStorage.key(q);W.indexOf(U)===0&&localStorage.removeItem(W)}}):_=y.reject("Invalid arguments"),C(_,P),_}var W0={_driver:"localStorageWrapper",_initStorage:it,_support:rn(),iterate:zn,getItem:Qt,setItem:j0,removeItem:q0,clear:ft,length:jc,key:Tt,keys:ko,dropInstance:V0},z0=function(P,S){return P===S||typeof P=="number"&&typeof S=="number"&&isNaN(P)&&isNaN(S)},K0=function(P,S){for(var R=P.length,_=0;_"u"?"undefined":c(S))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var R in S){if(R==="storeName"&&(S[R]=S[R].replace(/\W/g,"_")),R==="version"&&typeof S[R]!="number")return new Error("Database version must be a number.");this._config[R]=S[R]}return"driver"in S&&S.driver?this.setDriver(this._config.driver):!0}else return typeof S=="string"?this._config[S]:this._config},w.prototype.defineDriver=function(S,R,_){var U=new y(function(q,W){try{var Z=S._driver,Y=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!S._driver){W(Y);return}for(var ee=Vc.concat("_initStorage"),de=0,Re=ee.length;de{var K1=200,Of="__lodash_hash_undefined__",Uf=9007199254740991,bu="[object Arguments]",X1="[object Array]",Bf="[object Boolean]",Rf="[object Date]",Z1="[object Error]",yu="[object Function]",If="[object GeneratorFunction]",dl="[object Map]",Nf="[object Number]",vu="[object Object]",Cf="[object Promise]",_f="[object RegExp]",pl="[object Set]",$f="[object String]",Df="[object Symbol]",du="[object WeakMap]",Gf="[object ArrayBuffer]",fl="[object DataView]",Hf="[object Float32Array]",Ff="[object Float64Array]",Qf="[object Int8Array]",qf="[object Int16Array]",jf="[object Int32Array]",Vf="[object Uint8Array]",Wf="[object Uint8ClampedArray]",zf="[object Uint16Array]",Kf="[object Uint32Array]",Y1=/[\\^$.*+?()[\]{}|]/g,J1=/\w*$/,eb=/^\[object .+?Constructor\]$/,tb=/^(?:0|[1-9]\d*)$/,tt={};tt[bu]=tt[X1]=tt[Gf]=tt[fl]=tt[Bf]=tt[Rf]=tt[Hf]=tt[Ff]=tt[Qf]=tt[qf]=tt[jf]=tt[dl]=tt[Nf]=tt[vu]=tt[_f]=tt[pl]=tt[$f]=tt[Df]=tt[Vf]=tt[Wf]=tt[zf]=tt[Kf]=!0;tt[Z1]=tt[yu]=tt[du]=!1;var rb=typeof global=="object"&&global&&global.Object===Object&&global,nb=typeof self=="object"&&self&&self.Object===Object&&self,Ln=rb||nb||Function("return this")(),Xf=typeof Ro=="object"&&Ro&&!Ro.nodeType&&Ro,wf=Xf&&typeof Us=="object"&&Us&&!Us.nodeType&&Us,ab=wf&&wf.exports===Xf;function sb(t,r){return t.set(r[0],r[1]),t}function ob(t,r){return t.add(r),t}function ib(t,r){for(var n=-1,a=t?t.length:0;++n-1}function Rb(t,r){var n=this.__data__,a=hl(n,t);return a<0?n.push([t,r]):n[a][1]=r,this}An.prototype.clear=Eb;An.prototype.delete=Ob;An.prototype.get=Ub;An.prototype.has=Bb;An.prototype.set=Rb;function Bs(t){var r=-1,n=t?t.length:0;for(this.clear();++r-1&&t%1==0&&t-1&&t%1==0&&t<=Uf}function yl(t){var r=typeof t;return!!t&&(r=="object"||r=="function")}function vy(t){return!!t&&typeof t=="object"}function Mu(t){return sg(t)?jb(t):Zb(t)}function Cy(){return[]}function wy(){return!1}Us.exports=gy});var am=Pa((Ql,nm)=>{(function(t,r){typeof Ql=="object"&&typeof nm<"u"?r(Ql):typeof define=="function"&&define.amd?define(["exports"],r):(t=typeof globalThis<"u"?globalThis:t||self,r(t.fastUniqueNumbers={}))})(Ql,function(t){"use strict";var r=function(y){return function(C){var x=y(C);return C.add(x),x}},n=function(y){return function(C,x){return y.set(C,x),x}},a=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,s=536870912,o=s*2,c=function(y,C){return function(x){var D=C.get(x),$=D===void 0?x.size:Da)throw new Error("Congratulations, you created a collection of unique numbers which uses all available integers!");for(;x.has($);)$=Math.floor(Math.random()*a);return y(x,$)}},p=new WeakMap,f=n(p),g=c(f,p),h=r(g);t.addUniqueNumber=h,t.generateUniqueNumber=g})});(function(){"use strict";var t=function(re,V){var ne=function(qe){for(var Le=0,Ge=qe.length;Lere.length)&&(V=re.length);for(var ne=0,we=new Array(V);ne=re.length?{done:!0}:{done:!1,value:re[we++]}},e:function(pt){throw pt},f:Se}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var qe=!0,Le=!1,Ge;return{s:function(){ne=ne.call(re)},n:function(){var pt=ne.next();return qe=pt.done,pt},e:function(pt){Le=!0,Ge=pt},f:function(){try{!qe&&ne.return!=null&&ne.return()}finally{if(Le)throw Ge}}}}var s=!0,o=!1,c="querySelectorAll",p=function(V){var ne=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,we=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,Se=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],qe=function pt(rn,Gr,_t,Ue,it,ft){var Qt=a(rn),zn;try{for(Qt.s();!(zn=Qt.n()).done;){var Tt=zn.value;(ft||c in Tt)&&(it?_t.has(Tt)||(_t.add(Tt),Ue.delete(Tt),V(Tt,it)):Ue.has(Tt)||(Ue.add(Tt),_t.delete(Tt),V(Tt,it)),ft||pt(Tt[c](Gr),Gr,_t,Ue,it,s))}}catch(ko){Qt.e(ko)}finally{Qt.f()}},Le=new we(function(pt){if(Se.length){var rn=Se.join(","),Gr=new Set,_t=new Set,Ue=a(pt),it;try{for(Ue.s();!(it=Ue.n()).done;){var ft=it.value,Qt=ft.addedNodes,zn=ft.removedNodes;qe(zn,rn,Gr,_t,o,o),qe(Qt,rn,Gr,_t,s,o)}}catch(Tt){Ue.e(Tt)}finally{Ue.f()}}}),Ge=Le.observe;return(Le.observe=function(pt){return Ge.call(Le,pt,{subtree:s,childList:s})})(ne),Le},f="querySelectorAll",g=self,h=g.document,b=g.Element,y=g.MutationObserver,C=g.Set,x=g.WeakMap,D=function(V){return f in V},$=[].filter,L=function(re){var V=new x,ne=function(Ue){for(var it=0,ft=Ue.length;it1&&arguments[1]!==void 0?arguments[1]:!0,ft=0,Qt=Ue.length;ft=1&&this.m<10)return this;if(this.m===0)return this.m=0,this.e=0,this;var r=Math.floor(Math.log10(Math.abs(this.m)));return this.m=r===-324?10*this.m/1e-323:this.m/Xi(r),this.e+=r,this},t.prototype.fromMantissaExponent=function(r,n){return isFinite(r)&&isFinite(n)?(this.m=r,this.e=n,this.normalize(),this):(r=Number.NaN,n=Number.NaN,this)},t.prototype.fromMantissaExponent_noNormalize=function(r,n){return this.m=r,this.e=n,this},t.prototype.fromDecimal=function(r){return this.m=r.m,this.e=r.e,this},t.prototype.fromNumber=function(r){return isNaN(r)?(this.m=Number.NaN,this.e=Number.NaN):r===Number.POSITIVE_INFINITY?(this.m=1,this.e=nn):r===Number.NEGATIVE_INFINITY?(this.m=-1,this.e=nn):r===0?(this.m=0,this.e=0):(this.e=Math.floor(Math.log10(Math.abs(r))),this.m=this.e===-324?10*r/1e-323:r/Xi(this.e),this.normalize()),this},t.prototype.fromString=function(r){if(r.indexOf("e")!==-1){var n=r.split("e");this.m=parseFloat(n[0]),this.e=parseFloat(n[1]),this.normalize()}else if(r==="NaN")this.m=Number.NaN,this.e=Number.NaN;else if(this.fromNumber(parseFloat(r)),isNaN(this.m))throw Error("[DecimalError] Invalid argument: "+r);return this},t.prototype.fromValue=function(r){return r instanceof t?this.fromDecimal(r):typeof r=="number"?this.fromNumber(r):typeof r=="string"?this.fromString(r):(this.m=0,this.e=0,this)},t.prototype.toNumber=function(){if(!isFinite(this.e))return Number.NaN;if(this.e>308)return this.m>0?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY;if(this.e<-324)return 0;if(this.e===-324)return this.m>0?5e-324:-5e-324;var r=this.m*Xi(this.e);if(!isFinite(r)||this.e<0)return r;var n=Math.round(r);return Math.abs(n-r)<1e-10?n:r},t.prototype.mantissaWithDecimalPlaces=function(r){if(isNaN(this.m)||isNaN(this.e))return Number.NaN;if(this.m===0)return 0;var n=r+1,a=Math.ceil(Math.log10(Math.abs(this.m))),s=Math.round(this.m*Math.pow(10,n-a))*Math.pow(10,a-n);return parseFloat(s.toFixed(Math.max(n-a,0)))},t.prototype.toString=function(){return isNaN(this.m)||isNaN(this.e)?"NaN":this.e>=nn?this.m>0?"Infinity":"-Infinity":this.e<=-nn||this.m===0?"0":this.e<21&&this.e>-7?this.toNumber().toString():this.m+"e"+(this.e>=0?"+":"")+this.e},t.prototype.toExponential=function(r){if(isNaN(this.m)||isNaN(this.e))return"NaN";if(this.e>=nn)return this.m>0?"Infinity":"-Infinity";if(this.e<=-nn||this.m===0)return"0"+(r>0?(0,Zi.default)(".",r+1,"0"):"")+"e+0";if(this.e>-324&&this.e<308)return this.toNumber().toExponential(r);isFinite(r)||(r=17);var n=r+1,a=Math.max(1,Math.ceil(Math.log10(Math.abs(this.m))));return(Math.round(this.m*Math.pow(10,n-a))*Math.pow(10,a-n)).toFixed(Math.max(n-a,0))+"e"+(this.e>=0?"+":"")+this.e},t.prototype.toFixed=function(r){return isNaN(this.m)||isNaN(this.e)?"NaN":this.e>=nn?this.m>0?"Infinity":"-Infinity":this.e<=-nn||this.m===0?"0"+(r>0?(0,Zi.default)(".",r+1,"0"):""):this.e>=17?this.m.toString().replace(".","").padEnd(this.e+1,"0")+(r>0?(0,Zi.default)(".",r+1,"0"):""):this.toNumber().toFixed(r)},t.prototype.toPrecision=function(r){return this.e<=-7?this.toExponential(r-1):r>this.e?this.toFixed(r-this.e-1):this.toExponential(r-1)},t.prototype.valueOf=function(){return this.toString()},t.prototype.toJSON=function(){return this.toString()},t.prototype.toStringWithDecimalPlaces=function(r){return this.toExponential(r)},t.prototype.abs=function(){return Ea(Math.abs(this.m),this.e)},t.prototype.neg=function(){return Ea(-this.m,this.e)},t.prototype.negate=function(){return this.neg()},t.prototype.negated=function(){return this.neg()},t.prototype.sign=function(){return Math.sign(this.m)},t.prototype.sgn=function(){return this.sign()},t.prototype.round=function(){return this.e<-1?new t(0):this.e<17?new t(Math.round(this.toNumber())):this},t.prototype.floor=function(){return this.e<-1?Math.sign(this.m)>=0?new t(0):new t(-1):this.e<17?new t(Math.floor(this.toNumber())):this},t.prototype.ceil=function(){return this.e<-1?Math.sign(this.m)>0?new t(1):new t(0):this.e<17?new t(Math.ceil(this.toNumber())):this},t.prototype.trunc=function(){return this.e<0?new t(0):this.e<17?new t(Math.trunc(this.toNumber())):this},t.prototype.add=function(r){var n,a,s=K(r);if(this.m===0)return s;if(s.m===0)return this;if(this.e>=s.e?(n=this,a=s):(n=s,a=this),n.e-a.e>17)return n;var o=Math.round(1e14*n.m+1e14*a.m*Xi(a.e-n.e));return Yt(o,n.e-14)},t.prototype.plus=function(r){return this.add(r)},t.prototype.sub=function(r){return this.add(K(r).neg())},t.prototype.subtract=function(r){return this.sub(r)},t.prototype.minus=function(r){return this.sub(r)},t.prototype.mul=function(r){if(typeof r=="number")return r<1e307&&r>-1e307?Yt(this.m*r,this.e):Yt(1e-307*this.m*r,this.e+307);var n=typeof r=="string"?new t(r):r;return Yt(this.m*n.m,this.e+n.e)},t.prototype.multiply=function(r){return this.mul(r)},t.prototype.times=function(r){return this.mul(r)},t.prototype.div=function(r){return this.mul(K(r).recip())},t.prototype.divide=function(r){return this.div(r)},t.prototype.divideBy=function(r){return this.div(r)},t.prototype.dividedBy=function(r){return this.div(r)},t.prototype.recip=function(){return Yt(1/this.m,-this.e)},t.prototype.reciprocal=function(){return this.recip()},t.prototype.reciprocate=function(){return this.recip()},t.prototype.cmp=function(r){var n=K(r);if(this.m===0){if(n.m===0)return 0;if(n.m<0)return 1;if(n.m>0)return-1}if(n.m===0){if(this.m<0)return-1;if(this.m>0)return 1}if(this.m>0)return n.m<0||this.e>n.e?1:this.en.m?1:this.m0||this.e>n.e?-1:this.en.m?1:this.m0:n.m===0?this.m<=0:this.e===n.e?this.m0?n.m>0&&this.e0||this.e>n.e},t.prototype.lte=function(r){return!this.gt(r)},t.prototype.gt=function(r){var n=K(r);return this.m===0?n.m<0:n.m===0?this.m>0:this.e===n.e?this.m>n.m:this.m>0?n.m<0||this.e>n.e:n.m<0&&this.e-1},t.prototype.greaterThan=function(r){return this.cmp(r)>0},t.prototype.decimalPlaces=function(){return this.dp()},t.prototype.dp=function(){if(!isFinite(this.mantissa))return NaN;if(this.exponent>=17)return 0;for(var r=this.mantissa,n=-this.exponent,a=1;Math.abs(Math.round(r*a)/a-r)>1e-10;)a*=10,n++;return n>0?n:0},Object.defineProperty(t,"MAX_VALUE",{get:function(){return f1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"MIN_VALUE",{get:function(){return g1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"NUMBER_MAX_VALUE",{get:function(){return m1},enumerable:!1,configurable:!0}),Object.defineProperty(t,"NUMBER_MIN_VALUE",{get:function(){return h1},enumerable:!1,configurable:!0}),t}(),f1=Ea(1,nn),g1=Ea(1,-nn),m1=K(Number.MAX_VALUE),h1=K(Number.MIN_VALUE),m=Kn;var Q0=Hr(eu());function $t(t){"@babel/helpers - typeof";return $t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$t(t)}function Fr(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function Dp(t,r){if($t(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var a=n.call(t,r||"default");if($t(a)!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(t)}function Ji(t){var r=Dp(t,"string");return $t(r)=="symbol"?r:r+""}function Gp(t,r){for(var n=0;nt.length)&&(r=t.length);for(var n=0,a=Array(r);n1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.init(r,n)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=n||b1,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,a=new Array(n),s=0;s1?a-1:0),o=1;o-1?p.replace(/###/g,"."):p}function s(){return!t||typeof t=="string"}for(var o=typeof r!="string"?[].concat(r):r.split(".");o.length>1;){if(s())return{};var c=a(o.shift());!t[c]&&n&&(t[c]=new n),Object.prototype.hasOwnProperty.call(t,c)?t=t[c]:t={}}return s()?{}:{obj:t,k:a(o.shift())}}function Kp(t,r,n){var a=nu(t,r,Object),s=a.obj,o=a.k;s[o]=n}function C1(t,r,n,a){var s=nu(t,r,Object),o=s.obj,c=s.k;o[c]=o[c]||[],a&&(o[c]=o[c].concat(n)),a||o[c].push(n)}function nl(t,r){var n=nu(t,r),a=n.obj,s=n.k;if(a)return a[s]}function w1(t,r,n){var a=nl(t,n);return a!==void 0?a:nl(r,n)}function df(t,r,n){for(var a in r)a!=="__proto__"&&a!=="constructor"&&(a in t?typeof t[a]=="string"||t[a]instanceof String||typeof r[a]=="string"||r[a]instanceof String?n&&(t[a]=r[a]):df(t[a],r[a],n):t[a]=r[a]);return t}function Ps(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M1(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(r){return x1[r]}):t}var ol=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,S1=[" ",",","?","!",";"];function T1(t,r,n){r=r||"",n=n||"";var a=S1.filter(function(p){return r.indexOf(p)<0&&n.indexOf(p)<0});if(a.length===0)return!0;var s=new RegExp("(".concat(a.map(function(p){return p==="?"?"\\?":p}).join("|"),")")),o=!s.test(t);if(!o){var c=t.indexOf(n);c>0&&!s.test(t.substring(0,c))&&(o=!0)}return o}function al(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[r])return t[r];for(var a=r.split(n),s=t,o=0;oo+c;)c++,p=a.slice(o,o+c).join(n),f=s[p];if(f===void 0)return;if(f===null)return null;if(r.endsWith(p)){if(typeof f=="string")return f;if(p&&typeof f[p]=="string")return f[p]}var g=a.slice(o+c).join(n);return g?al(f,g,n):void 0}s=s[a[o]]}return s}}function Xp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function tl(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var A1=function(t){Eo(n,t);var r=k1(n);function n(a){var s,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Fr(this,n),s=r.call(this),ol&&Xn.call(an(s)),s.data=a||{},s.options=o,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.options.ignoreJSONStructure===void 0&&(s.options.ignoreJSONStructure=!0),s}return Qr(n,[{key:"addNamespaces",value:function(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}},{key:"removeNamespaces",value:function(s){var o=this.options.ns.indexOf(s);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,g=p.ignoreJSONStructure!==void 0?p.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[s,o];c&&typeof c!="string"&&(h=h.concat(c)),c&&typeof c=="string"&&(h=h.concat(f?c.split(f):c)),s.indexOf(".")>-1&&(h=s.split("."));var b=nl(this.data,h);return b||!g||typeof c!="string"?b:al(this.data&&this.data[s]&&this.data[s][o],c,f)}},{key:"addResource",value:function(s,o,c,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},g=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=[s,o];c&&(h=h.concat(g?c.split(g):c)),s.indexOf(".")>-1&&(h=s.split("."),p=o,o=h[1]),this.addNamespaces(o),Kp(this.data,h,p),f.silent||this.emit("added",s,o,c,p)}},{key:"addResources",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in c)(typeof c[f]=="string"||Object.prototype.toString.apply(c[f])==="[object Array]")&&this.addResource(s,o,f,c[f],{silent:!0});p.silent||this.emit("added",s,o,c)}},{key:"addResourceBundle",value:function(s,o,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[s,o];s.indexOf(".")>-1&&(h=s.split("."),p=c,c=o,o=h[1]),this.addNamespaces(o);var b=nl(this.data,h)||{};p?df(b,c,f):b=tl(tl({},b),c),Kp(this.data,h,b),g.silent||this.emit("added",s,o,c)}},{key:"removeResourceBundle",value:function(s,o){this.hasResourceBundle(s,o)&&delete this.data[s][o],this.removeNamespaces(o),this.emit("removed",s,o)}},{key:"hasResourceBundle",value:function(s,o){return this.getResource(s,o)!==void 0}},{key:"getResourceBundle",value:function(s,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?tl(tl({},{}),this.getResource(s,o)):this.getResource(s,o)}},{key:"getDataByLanguage",value:function(s){return this.data[s]}},{key:"hasLanguageSomeTranslations",value:function(s){var o=this.getDataByLanguage(s),c=o&&Object.keys(o)||[];return!!c.find(function(p){return o[p]&&Object.keys(o[p]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Xn),pf={processors:{},addPostProcessor:function(r){this.processors[r.name]=r},handle:function(r,n,a,s,o){var c=this;return r.forEach(function(p){c.processors[p]&&(n=c.processors[p].process(n,a,s,o))}),n}};function Zp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Dt(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Yp={},Jp=function(t){Eo(n,t);var r=P1(n);function n(a){var s,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fr(this,n),s=r.call(this),ol&&Xn.call(an(s)),v1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,an(s)),s.options=o,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.logger=on.create("translator"),s}return Qr(n,[{key:"changeLanguage",value:function(s){s&&(this.language=s)}},{key:"exists",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;var c=this.resolve(s,o);return c&&c.res!==void 0}},{key:"extractFromKey",value:function(s,o){var c=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");var p=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ns||this.options.defaultNS||[],g=c&&s.indexOf(c)>-1,h=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!T1(s,c,p);if(g&&!h){var b=s.match(this.interpolator.nestingRegexp);if(b&&b.length>0)return{key:s,namespaces:f};var y=s.split(c);(c!==p||c===p&&this.options.ns.indexOf(y[0])>-1)&&(f=y.shift()),s=y.join(p)}return typeof f=="string"&&(f=[f]),{key:s,namespaces:f}}},{key:"translate",value:function(s,o,c){var p=this;if($t(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),$t(o)==="object"&&(o=Dt({},o)),o||(o={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);var f=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,g=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,h=this.extractFromKey(s[s.length-1],o),b=h.key,y=h.namespaces,C=y[y.length-1],x=o.lng||this.language,D=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x&&x.toLowerCase()==="cimode"){if(D){var $=o.nsSeparator||this.options.nsSeparator;return f?{res:"".concat(C).concat($).concat(b),usedKey:b,exactUsedKey:b,usedLng:x,usedNS:C}:"".concat(C).concat($).concat(b)}return f?{res:b,usedKey:b,exactUsedKey:b,usedLng:x,usedNS:C}:b}var L=this.resolve(s,o),E=L&&L.res,H=L&&L.usedKey||b,I=L&&L.exactUsedKey||b,N=Object.prototype.toString.apply(E),k=["[object Number]","[object Function]","[object RegExp]"],A=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,Q=!this.i18nFormat||this.i18nFormat.handleAsObject,J=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(Q&&E&&J&&k.indexOf(N)<0&&!(typeof A=="string"&&N==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(H,E,Dt(Dt({},o),{},{ns:y})):"key '".concat(b," (").concat(this.language,")' returned an object instead of string.");return f?(L.res=M,L):M}if(g){var j=N==="[object Array]",ae=j?[]:{},ge=j?I:H;for(var Je in E)if(Object.prototype.hasOwnProperty.call(E,Je)){var ut="".concat(ge).concat(g).concat(Je);ae[Je]=this.translate(ut,Dt(Dt({},o),{joinArrays:!1,ns:y})),ae[Je]===ut&&(ae[Je]=E[Je])}E=ae}}else if(Q&&typeof A=="string"&&N==="[object Array]")E=E.join(A),E&&(E=this.extendTranslation(E,s,o,c));else{var ht=!1,Ot=!1,xt=o.count!==void 0&&typeof o.count!="string",Nt=n.hasDefaultValue(o),ve=xt?this.pluralResolver.getSuffix(x,o.count,o):"",ue=o["defaultValue".concat(ve)]||o.defaultValue;!this.isValidLookup(E)&&Nt&&(ht=!0,E=ue),this.isValidLookup(E)||(Ot=!0,E=b);var le=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,be=le&&Ot?void 0:E,me=Nt&&ue!==E&&this.options.updateMissing;if(Ot||ht||me){if(this.logger.log(me?"updateKey":"missingKey",x,C,b,me?ue:E),g){var ke=this.resolve(b,Dt(Dt({},o),{},{keySeparator:!1}));ke&&ke.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.")}var Ye=[],O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(var St=0;St1&&arguments[1]!==void 0?arguments[1]:{},p,f,g,h,b;return typeof s=="string"&&(s=[s]),s.forEach(function(y){if(!o.isValidLookup(p)){var C=o.extractFromKey(y,c),x=C.key;f=x;var D=C.namespaces;o.options.fallbackNS&&(D=D.concat(o.options.fallbackNS));var $=c.count!==void 0&&typeof c.count!="string",L=$&&!c.ordinal&&c.count===0&&o.pluralResolver.shouldUseIntlApi(),E=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",H=c.lngs?c.lngs:o.languageUtils.toResolveHierarchy(c.lng||o.language,c.fallbackLng);D.forEach(function(I){o.isValidLookup(p)||(b=I,!Yp["".concat(H[0],"-").concat(I)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(b)&&(Yp["".concat(H[0],"-").concat(I)]=!0,o.logger.warn('key "'.concat(f,'" for languages "').concat(H.join(", "),`" won't get resolved as namespace "`).concat(b,'" 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!!!")),H.forEach(function(N){if(!o.isValidLookup(p)){h=N;var k=[x];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(k,x,N,I,c);else{var A;$&&(A=o.pluralResolver.getSuffix(N,c.count,c));var Q="".concat(o.options.pluralSeparator,"zero");if($&&(k.push(x+A),L&&k.push(x+Q)),E){var J="".concat(x).concat(o.options.contextSeparator).concat(c.context);k.push(J),$&&(k.push(J+A),L&&k.push(J+Q))}}for(var M;M=k.pop();)o.isValidLookup(p)||(g=M,p=o.getResource(N,I,M,c))}}))})}}),{res:p,usedKey:f,exactUsedKey:g,usedLng:h,usedNS:b}}},{key:"isValidLookup",value:function(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}},{key:"getResource",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,o,c,p):this.resourceStore.getResource(s,o,c,p)}}],[{key:"hasDefaultValue",value:function(s){var o="defaultValue";for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c)&&o===c.substring(0,o.length)&&s[c]!==void 0)return!0;return!1}}]),n}(Xn);function ru(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ef=function(){function t(r){Fr(this,t),this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}return Qr(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var a=n.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],s=n.split("-");return this.options.lowerCaseLng?s=s.map(function(o){return o.toLowerCase()}):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=ru(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()),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=ru(s[1].toLowerCase())),a.indexOf(s[2].toLowerCase())>-1&&(s[2]=ru(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var a=this;if(!n)return null;var s;return n.forEach(function(o){if(!s){var c=a.formatLanguageCode(o);(!a.options.supportedLngs||a.isSupportedCode(c))&&(s=c)}}),!s&&this.options.supportedLngs&&n.forEach(function(o){if(!s){var c=a.getLanguagePartFromCode(o);if(a.isSupportedCode(c))return s=c;s=a.options.supportedLngs.find(function(p){if(p===c)return p;if(!(p.indexOf("-")<0&&c.indexOf("-")<0)&&p.indexOf(c)===0)return p})}}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}},{key:"getFallbackCodes",value:function(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!a)return n.default||[];var s=n[a];return s||(s=n[this.getScriptPartFromCode(a)]),s||(s=n[this.formatLanguageCode(a)]),s||(s=n[this.getLanguagePartFromCode(a)]),s||(s=n.default),s||[]}},{key:"toResolveHierarchy",value:function(n,a){var s=this,o=this.getFallbackCodes(a||this.options.fallbackLng||[],n),c=[],p=function(g){g&&(s.isSupportedCode(g)?c.push(g):s.logger.warn("rejecting language code not found in supportedLngs: ".concat(g)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(n))):typeof n=="string"&&p(this.formatLanguageCode(n)),o.forEach(function(f){c.indexOf(f)<0&&p(s.formatLanguageCode(f))}),c}}]),t}(),O1=[{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}],U1={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}},B1=["v1","v2","v3"],tf={zero:0,one:1,two:2,few:3,many:4,other:5};function R1(){var t={};return O1.forEach(function(r){r.lngs.forEach(function(n){t[n]={numbers:r.nr,plurals:U1[r.fc]}})}),t}var I1=function(){function t(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.languageUtils=r,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(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=R1()}return Qr(t,[{key:"addRule",value:function(n,a){this.rules[n]=a}},{key:"getRule",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:a.ordinal?"ordinal":"cardinal"})}catch(s){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,a);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,s).map(function(o){return"".concat(a).concat(o)})}},{key:"getSuffixes",value:function(n){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,s);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(c,p){return tf[c]-tf[p]}).map(function(c){return"".concat(a.options.prepend).concat(c)}):o.numbers.map(function(c){return a.getSuffix(n,c,s)}):[]}},{key:"getSuffix",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,s);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(a)):this.getSuffixRetroCompatible(o,a):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,a){var s=this,o=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),c=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(c===2?c="plural":c===1&&(c=""));var p=function(){return s.options.prepend&&c.toString()?s.options.prepend+c.toString():c.toString()};return this.options.compatibilityJSON==="v1"?c===1?"":typeof c=="number"?"_plural_".concat(c.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?p():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!B1.includes(this.options.compatibilityJSON)}}]),t}();function rf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function jr(t){for(var r=1;r3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=w1(t,r,n);return!o&&s&&typeof n=="string"&&(o=al(t,n,a),o===void 0&&(o=al(r,n,a))),o}var N1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n},this.init(r)}return Qr(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var a=n.interpolation;this.escape=a.escape!==void 0?a.escape:M1,this.escapeValue=a.escapeValue!==void 0?a.escapeValue:!0,this.useRawValueToEscape=a.useRawValueToEscape!==void 0?a.useRawValueToEscape:!1,this.prefix=a.prefix?Ps(a.prefix):a.prefixEscaped||"{{",this.suffix=a.suffix?Ps(a.suffix):a.suffixEscaped||"}}",this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||",",this.unescapePrefix=a.unescapeSuffix?"":a.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":a.unescapeSuffix||"",this.nestingPrefix=a.nestingPrefix?Ps(a.nestingPrefix):a.nestingPrefixEscaped||Ps("$t("),this.nestingSuffix=a.nestingSuffix?Ps(a.nestingSuffix):a.nestingSuffixEscaped||Ps(")"),this.nestingOptionsSeparator=a.nestingOptionsSeparator?a.nestingOptionsSeparator:a.nestingOptionsSeparator||",",this.maxReplaces=a.maxReplaces?a.maxReplaces:1e3,this.alwaysFormat=a.alwaysFormat!==void 0?a.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var s="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(s,"g")}},{key:"interpolate",value:function(n,a,s,o){var c=this,p,f,g,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function b($){return $.replace(/\$/g,"$$$$")}var y=function(L){if(L.indexOf(c.formatSeparator)<0){var E=nf(a,h,L,c.options.keySeparator,c.options.ignoreJSONStructure);return c.alwaysFormat?c.format(E,void 0,s,jr(jr(jr({},o),a),{},{interpolationkey:L})):E}var H=L.split(c.formatSeparator),I=H.shift().trim(),N=H.join(c.formatSeparator).trim();return c.format(nf(a,h,I,c.options.keySeparator,c.options.ignoreJSONStructure),N,s,jr(jr(jr({},o),a),{},{interpolationkey:I}))};this.resetRegExp();var C=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,x=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,D=[{regex:this.regexpUnescape,safeValue:function(L){return b(L)}},{regex:this.regexp,safeValue:function(L){return c.escapeValue?b(c.escape(L)):b(L)}}];return D.forEach(function($){for(g=0;p=$.regex.exec(n);){var L=p[1].trim();if(f=y(L),f===void 0)if(typeof C=="function"){var E=C(n,p,o);f=typeof E=="string"?E:""}else if(o&&Object.prototype.hasOwnProperty.call(o,L))f="";else if(x){f=p[0];continue}else c.logger.warn("missed to pass in variable ".concat(L," for interpolating ").concat(n)),f="";else typeof f!="string"&&!c.useRawValueToEscape&&(f=zp(f));var H=$.safeValue(f);if(n=n.replace(p[0],H),x?($.regex.lastIndex+=f.length,$.regex.lastIndex-=p[0].length):$.regex.lastIndex=0,g++,g>=c.maxReplaces)break}}),n}},{key:"nest",value:function(n,a){var s=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,p,f;function g(C,x){var D=this.nestingOptionsSeparator;if(C.indexOf(D)<0)return C;var $=C.split(new RegExp("".concat(D,"[ ]*{"))),L="{".concat($[1]);C=$[0],L=this.interpolate(L,f);var E=L.match(/'/g),H=L.match(/"/g);(E&&E.length%2===0&&!H||H.length%2!==0)&&(L=L.replace(/'/g,'"'));try{f=JSON.parse(L),x&&(f=jr(jr({},x),f))}catch(I){return this.logger.warn("failed parsing options string in nesting for key ".concat(C),I),"".concat(C).concat(D).concat(L)}return delete f.defaultValue,C}for(;c=this.nestingRegexp.exec(n);){var h=[];f=jr({},o),f=f.replace&&typeof f.replace!="string"?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;var b=!1;if(c[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(c[1])){var y=c[1].split(this.formatSeparator).map(function(C){return C.trim()});c[1]=y.shift(),h=y,b=!0}if(p=a(g.call(this,c[1].trim(),f),f),p&&c[0]===n&&typeof p!="string")return p;typeof p!="string"&&(p=zp(p)),p||(this.logger.warn("missed to resolve ".concat(c[1]," for nesting ").concat(n)),p=""),b&&(p=h.reduce(function(C,x){return s.format(C,x,o.lng,jr(jr({},o),{},{interpolationkey:c[1].trim()}))},p.trim())),n=n.replace(c[0],p),this.regexp.lastIndex=0}return n}}]),t}();function af(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function kn(t){for(var r=1;r-1){var a=t.split("(");r=a[0].toLowerCase().trim();var s=a[1].substring(0,a[1].length-1);if(r==="currency"&&s.indexOf(":")<0)n.currency||(n.currency=s.trim());else if(r==="relativetime"&&s.indexOf(":")<0)n.range||(n.range=s.trim());else{var o=s.split(";");o.forEach(function(c){if(c){var p=c.split(":"),f=jp(p),g=f[0],h=f.slice(1),b=h.join(":").trim().replace(/^'+|'+$/g,"");n[g.trim()]||(n[g.trim()]=b),b==="false"&&(n[g.trim()]=!1),b==="true"&&(n[g.trim()]=!0),isNaN(b)||(n[g.trim()]=parseInt(b,10))}})}}return{formatName:r,formatOptions:n}}function Es(t){var r={};return function(a,s,o){var c=s+JSON.stringify(o),p=r[c];return p||(p=t(s,o),r[c]=p),p(a)}}var $1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("formatter"),this.options=r,this.formats={number:Es(function(n,a){var s=new Intl.NumberFormat(n,kn({},a));return function(o){return s.format(o)}}),currency:Es(function(n,a){var s=new Intl.NumberFormat(n,kn(kn({},a),{},{style:"currency"}));return function(o){return s.format(o)}}),datetime:Es(function(n,a){var s=new Intl.DateTimeFormat(n,kn({},a));return function(o){return s.format(o)}}),relativetime:Es(function(n,a){var s=new Intl.RelativeTimeFormat(n,kn({},a));return function(o){return s.format(o,a.range||"day")}}),list:Es(function(n,a){var s=new Intl.ListFormat(n,kn({},a));return function(o){return s.format(o)}})},this.init(r)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},s=a.interpolation;this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||","}},{key:"add",value:function(n,a){this.formats[n.toLowerCase().trim()]=a}},{key:"addCached",value:function(n,a){this.formats[n.toLowerCase().trim()]=Es(a)}},{key:"format",value:function(n,a,s){var o=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=a.split(this.formatSeparator),f=p.reduce(function(g,h){var b=_1(h),y=b.formatName,C=b.formatOptions;if(o.formats[y]){var x=g;try{var D=c&&c.formatParams&&c.formatParams[c.interpolationkey]||{},$=D.locale||D.lng||c.locale||c.lng||s;x=o.formats[y](g,$,kn(kn(kn({},C),c),D))}catch(L){o.logger.warn(L)}return x}else o.logger.warn("there was no format function for ".concat(y));return g},n);return f}}]),t}();function sf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function of(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function H1(t,r){t.pending[r]!==void 0&&(delete t.pending[r],t.pendingCount--)}var F1=function(t){Eo(n,t);var r=D1(n);function n(a,s,o){var c,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Fr(this,n),c=r.call(this),ol&&Xn.call(an(c)),c.backend=a,c.store=s,c.services=o,c.languageUtils=o.languageUtils,c.options=p,c.logger=on.create("backendConnector"),c.waitingReads=[],c.maxParallelReads=p.maxParallelReads||10,c.readingCalls=0,c.maxRetries=p.maxRetries>=0?p.maxRetries:5,c.retryTimeout=p.retryTimeout>=1?p.retryTimeout:350,c.state={},c.queue=[],c.backend&&c.backend.init&&c.backend.init(o,p.backend,p),c}return Qr(n,[{key:"queueLoad",value:function(s,o,c,p){var f=this,g={},h={},b={},y={};return s.forEach(function(C){var x=!0;o.forEach(function(D){var $="".concat(C,"|").concat(D);!c.reload&&f.store.hasResourceBundle(C,D)?f.state[$]=2:f.state[$]<0||(f.state[$]===1?h[$]===void 0&&(h[$]=!0):(f.state[$]=1,x=!1,h[$]===void 0&&(h[$]=!0),g[$]===void 0&&(g[$]=!0),y[D]===void 0&&(y[D]=!0)))}),x||(b[C]=!0)}),(Object.keys(g).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:p}),{toLoad:Object.keys(g),pending:Object.keys(h),toLoadLanguages:Object.keys(b),toLoadNamespaces:Object.keys(y)}}},{key:"loaded",value:function(s,o,c){var p=s.split("|"),f=p[0],g=p[1];o&&this.emit("failedLoading",f,g,o),c&&this.store.addResourceBundle(f,g,c),this.state[s]=o?-1:2;var h={};this.queue.forEach(function(b){C1(b.loaded,[f],g),H1(b,s),o&&b.errors.push(o),b.pendingCount===0&&!b.done&&(Object.keys(b.loaded).forEach(function(y){h[y]||(h[y]={});var C=b.loaded[y];C.length&&C.forEach(function(x){h[y][x]===void 0&&(h[y][x]=!0)})}),b.done=!0,b.errors.length?b.callback(b.errors):b.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(b){return!b.done})}},{key:"read",value:function(s,o,c){var p=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:o,fcName:c,tried:f,wait:g,callback:h});return}this.readingCalls++;var b=function(D,$){if(p.readingCalls--,p.waitingReads.length>0){var L=p.waitingReads.shift();p.read(L.lng,L.ns,L.fcName,L.tried,L.wait,L.callback)}if(D&&$&&f2&&arguments[2]!==void 0?arguments[2]:{},f=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."),f&&f();typeof s=="string"&&(s=this.languageUtils.toResolveHierarchy(s)),typeof o=="string"&&(o=[o]);var g=this.queueLoad(s,o,p,f);if(!g.toLoad.length)return g.pending.length||f(),null;g.toLoad.forEach(function(h){c.loadOne(h)})}},{key:"load",value:function(s,o,c){this.prepareLoading(s,o,{},c)}},{key:"reload",value:function(s,o,c){this.prepareLoading(s,o,{reload:!0},c)}},{key:"loadOne",value:function(s){var o=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=s.split("|"),f=p[0],g=p[1];this.read(f,g,"read",void 0,void 0,function(h,b){h&&o.logger.warn("".concat(c,"loading namespace ").concat(g," for language ").concat(f," failed"),h),!h&&b&&o.logger.log("".concat(c,"loaded namespace ").concat(g," for language ").concat(f),b),o.loaded(s,h,b)})}},{key:"saveMissing",value:function(s,o,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(c,'" as the namespace "').concat(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!!!");return}if(!(c==null||c==="")){if(this.backend&&this.backend.create){var b=of(of({},g),{},{isUpdate:f}),y=this.backend.create.bind(this.backend);if(y.length<6)try{var C;y.length===5?C=y(s,o,c,p,b):C=y(s,o,c,p),C&&typeof C.then=="function"?C.then(function(x){return h(null,x)}).catch(h):h(null,C)}catch(x){h(x)}else y(s,o,c,p,h,b)}!s||!s[0]||this.store.addResource(s[0],o,c,p)}}}]),n}(Xn);function lf(){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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(r){var n={};if($t(r[1])==="object"&&(n=r[1]),typeof r[1]=="string"&&(n.defaultValue=r[1]),typeof r[2]=="string"&&(n.tDescription=r[2]),$t(r[2])==="object"||$t(r[3])==="object"){var a=r[3]||r[2];Object.keys(a).forEach(function(s){n[s]=a[s]})}return n},interpolation:{escapeValue:!0,format:function(r,n,a,s){return r},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function cf(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function uf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function sn(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function rl(){}function j1(t){var r=Object.getOwnPropertyNames(Object.getPrototypeOf(t));r.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var sl=function(t){Eo(n,t);var r=Q1(n);function n(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(Fr(this,n),a=r.call(this),ol&&Xn.call(an(a)),a.options=cf(s),a.services={},a.logger=on,a.modules={external:[]},j1(an(a)),o&&!a.isInitialized&&!s.isClone){if(!a.options.initImmediate)return a.init(s,o),As(a,an(a));setTimeout(function(){a.init(s,o)},0)}return a}return Qr(n,[{key:"init",value:function(){var s=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(c=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var p=lf();this.options=sn(sn(sn({},p),this.options),cf(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=sn(sn({},p.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function f(L){return L?typeof L=="function"?new L:L:null}if(!this.options.isClone){this.modules.logger?on.init(f(this.modules.logger),this.options):on.init(null,this.options);var g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=$1);var h=new ef(this.options);this.store=new A1(this.options.resources,this.options);var b=this.services;b.logger=on,b.resourceStore=this.store,b.languageUtils=h,b.pluralResolver=new I1(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===p.interpolation.format)&&(b.formatter=f(g),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new N1(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new F1(f(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(L){for(var E=arguments.length,H=new Array(E>1?E-1:0),I=1;I1?E-1:0),I=1;I0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var C=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];C.forEach(function(L){s[L]=function(){var E;return(E=s.store)[L].apply(E,arguments)}});var x=["addResource","addResources","addResourceBundle","removeResourceBundle"];x.forEach(function(L){s[L]=function(){var E;return(E=s.store)[L].apply(E,arguments),s}});var D=Oo(),$=function(){var E=function(I,N){s.isInitialized&&!s.initializedStoreOnce&&s.logger.warn("init: i18next is already initialized. You should call init just once!"),s.isInitialized=!0,s.options.isClone||s.logger.log("initialized",s.options),s.emit("initialized",s.options),D.resolve(N),c(I,N)};if(s.languages&&s.options.compatibilityAPI!=="v1"&&!s.isInitialized)return E(null,s.t.bind(s));s.changeLanguage(s.options.lng,E)};return this.options.resources||!this.options.initImmediate?$():setTimeout($,0),D}},{key:"loadResources",value:function(s){var o=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rl,p=c,f=typeof s=="string"?s:this.language;if(typeof s=="function"&&(p=s),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return p();var g=[],h=function(C){if(C){var x=o.services.languageUtils.toResolveHierarchy(C);x.forEach(function(D){g.indexOf(D)<0&&g.push(D)})}};if(f)h(f);else{var b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.forEach(function(y){return h(y)})}this.options.preload&&this.options.preload.forEach(function(y){return h(y)}),this.services.backendConnector.load(g,this.options.ns,function(y){!y&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),p(y)})}else p(null)}},{key:"reloadResources",value:function(s,o,c){var p=Oo();return s||(s=this.languages),o||(o=this.options.ns),c||(c=rl),this.services.backendConnector.reload(s,o,function(f){p.resolve(),c(f)}),p}},{key:"use",value:function(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&pf.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}},{key:"setResolvedLanguage",value:function(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}},{key:"changeLanguage",value:function(s,o){var c=this;this.isLanguageChangingTo=s;var p=Oo();this.emit("languageChanging",s);var f=function(y){c.language=y,c.languages=c.services.languageUtils.toResolveHierarchy(y),c.resolvedLanguage=void 0,c.setResolvedLanguage(y)},g=function(y,C){C?(f(C),c.translator.changeLanguage(C),c.isLanguageChangingTo=void 0,c.emit("languageChanged",C),c.logger.log("languageChanged",C)):c.isLanguageChangingTo=void 0,p.resolve(function(){return c.t.apply(c,arguments)}),o&&o(y,function(){return c.t.apply(c,arguments)})},h=function(y){!s&&!y&&c.services.languageDetector&&(y=[]);var C=typeof y=="string"?y:c.services.languageUtils.getBestMatchFromCodes(y);C&&(c.language||f(C),c.translator.language||c.translator.changeLanguage(C),c.services.languageDetector&&c.services.languageDetector.cacheUserLanguage&&c.services.languageDetector.cacheUserLanguage(C)),c.loadResources(C,function(x){g(x,C)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(s),p}},{key:"getFixedT",value:function(s,o,c){var p=this,f=function g(h,b){var y;if($t(b)!=="object"){for(var C=arguments.length,x=new Array(C>2?C-2:0),D=2;D1&&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;var p=c.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,g=this.languages[this.languages.length-1];if(p.toLowerCase()==="cimode")return!0;var h=function(C,x){var D=o.services.backendConnector.state["".concat(C,"|").concat(x)];return D===-1||D===2};if(c.precheck){var b=c.precheck(this,h);if(b!==void 0)return b}return!!(this.hasResourceBundle(p,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(p,s)&&(!f||h(g,s)))}},{key:"loadNamespaces",value:function(s,o){var c=this,p=Oo();return this.options.ns?(typeof s=="string"&&(s=[s]),s.forEach(function(f){c.options.ns.indexOf(f)<0&&c.options.ns.push(f)}),this.loadResources(function(f){p.resolve(),o&&o(f)}),p):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(s,o){var c=Oo();typeof s=="string"&&(s=[s]);var p=this.options.preload||[],f=s.filter(function(g){return p.indexOf(g)<0});return f.length?(this.options.preload=p.concat(f),this.loadResources(function(g){c.resolve(),o&&o(g)}),c):(o&&o(),Promise.resolve())}},{key:"dir",value:function(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";var o=["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"],c=this.services&&this.services.languageUtils||new ef(lf());return o.indexOf(c.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var s=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rl,p=sn(sn(sn({},this.options),o),{isClone:!0}),f=new n(p);(o.debug!==void 0||o.prefix!==void 0)&&(f.logger=f.logger.clone(o));var g=["store","services","language"];return g.forEach(function(h){f[h]=s[h]}),f.services=sn({},this.services),f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f.translator=new Jp(f.services,f.options),f.translator.on("*",function(h){for(var b=arguments.length,y=new Array(b>1?b-1:0),C=1;C0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new sl(t,r)});var u=sl.createInstance();u.createInstance=sl.createInstance;var ix=u.createInstance,lx=u.dir,cx=u.init,ux=u.loadResources,dx=u.reloadResources,px=u.use,fx=u.changeLanguage,gx=u.getFixedT,mx=u.t,hx=u.exists,bx=u.setDefaultNamespace,yx=u.hasLoadedNamespace,vx=u.loadNamespaces,Cx=u.loadLanguages;var au=new Map,l=t=>{let r=au.get(t);if(r)return r;let n=document.getElementById(t);if(!n)throw new TypeError(`Element with id "${t}" was not found on page?`);return au.set(t,n),n},ff=t=>au.has(t);var hf=Hr(mf()),Ht=new hf.default;var Zn=class{constructor(r){this.level=0;this.freeLevels=0;this.toggleBuy=1;var n,a,s,o;this.name=r.name,this.description=r.description,this.level=(n=r.level)!=null?n:0,this.freeLevels=(a=r.freeLevels)!=null?a:0,this.maxLevel=r.maxLevel,this.costPerLevel=r.costPerLevel,this.toggleBuy=(s=r.toggleBuy)!=null?s:1,this.effect=(o=r.effect)!=null?o:c=>({bonus:c,desc:"WIP not implemented"})}async changeToggle(){let r=await je(u.t("dynamicUpgrades.validation.setPurchaseAmount",{x:this.name})),n=Number(r);if(r===null)return B(u.t("dynamicUpgrades.validation.toggleKept",{x:d(this.toggleBuy)}));if(!Number.isInteger(r))return B(u.t("general.validation.fraction"));if(n<-1)return B(u.t("dynamicUpgrades.validation.onlyNegativeOne"));if(n===0)return B(u.t("dynamicUpgrades.validation.notZero"));this.toggleBuy=n;let a=n===-1?u.t("dynamicUpgrades.toggleMax"):u.t("dynamicUpgrades.toggle",{x:d(this.toggleBuy)});return B(a)}getEffect(){let r=this.level+Math.min(this.level,this.freeLevels)+Math.sqrt(Math.max(0,this.freeLevels-this.level));return this.effect(r)}};var Zh=Hr(iu());var zd=Hr(ll()),Yh=Hr(eu());var yr="3.1.0 January 3, 2025: The PseudoCoin Update";var Yn=new Date(Date.UTC(2025,0,11,23,18,17)),ln=!0;var Oa=()=>{let t=Object.keys(e.hypercubeBlessings);for(let r of t){let n=e.hypercubeBlessings[r],a=t.indexOf(r)+1,s=1,o=1;n>=1e3&&(s=i.benedictionDRPower[a],o*=Math.pow(1e3,1-i.benedictionDRPower[a])),i.hypercubeBonusMultiplier[a]=1+o*i.benedictionbase[a]*Math.pow(n,s)*i.platonicBonusMultiplier[4]}};var cl=()=>{let t=Object.values(e.platonicBlessings),r=[4e6,4e6,4e6,8e4,1e4,1e4,1e4,1e4];for(let n=0;n=1e20&&(o=Math.pow(o,.5)*1e10),t[n]>=r[n]&&(a=i.platonicDRPower[n],s*=Math.pow(r[n],1-i.platonicDRPower[n])),i.platonicBonusMultiplier[n]=1+s*i.platonicCubeBase[n]*Math.pow(o,a)}};var Jt=()=>{let t=9e4;e.researches[195]>0&&(t+=18e3*e.researches[195]);let r=5,n=[99,100,125,180,195];for(let p of n)r+=e.researches[p];r*=+e.octeractUpgrades.octeractExportQuarks.getEffect().bonus;let a=r,s=Math.floor(a*t/3600),o=Math.floor(e.quarkstimer*a/3600),c=ea();return{maxTime:t,perHour:a,capacity:s,gain:o,cubeMult:c}},yf=0,vf=t=>yf=t,vr=()=>yf,z1,Jn=class{constructor(r){this.QUARKS=0;this[z1]=r=>r==="number"?this.QUARKS:null;this.QUARKS=r}applyBonus(r){let n=ul();return r*(1+vr()/100)*n}add(r,n=!0){return this.QUARKS+=n?this.applyBonus(r):r,e.quarksThisSingularity+=n?this.applyBonus(r):r,this}sub(r){return this.QUARKS-=r,this.QUARKS<0&&(this.QUARKS=0),this}toString(r){return d(Math.floor(this.applyBonus(r)),0,!0)}reset(){this.QUARKS=0}};z1=Symbol.toPrimitive;var Ua=()=>{let t=[e.tesseractBlessings.accelerator,e.tesseractBlessings.multiplier,e.tesseractBlessings.offering,e.tesseractBlessings.runeExp,e.tesseractBlessings.obtainium,e.tesseractBlessings.antSpeed,e.tesseractBlessings.antSacrifice,e.tesseractBlessings.antELO,e.tesseractBlessings.talismanBonus,e.tesseractBlessings.globalSpeed];for(let r=0;r<10;r++){let n=1,a=1;t[r]>=1e3&&r!==5&&(n=i.giftDRPower[r],a*=Math.pow(1e3,1-i.giftDRPower[r])),i.tesseractBonusMultiplier[r+1]=1+a*i.giftbase[r]*Math.pow(t[r],n)*i.hypercubeBonusMultiplier[r+1]}};var Os={accelerator:{weight:4,pdf:t=>0<=t&&t<=20},multiplier:{weight:4,pdf:t=>2040506070808590950<=t&&t<=33},tesseracts:{weight:13200,pdf:t=>33669999.9999.992599.99599.9975100?B(u.t("cubes.validation.invalidPercent",{x:s})):a?this.open(Math.floor(r.value*(s/100)),s===100,!1):this.open(s,s===r.value,!1)}checkQuarkGain(r,n,a){if(a<1)return 0;let s=n*Jt().cubeMult;return Math.floor(e.worlds.applyBonus(Math.log10(a)*r*s))}checkCubesToNextQuark(r,n,a,s){let o=n*Jt().cubeMult;return Math.ceil(Math.pow(10,(a+1)/e.worlds.applyBonus(o*r))-s)}add(r){return this.value=Math.min(1e300,this.value+r),this}sub(r){return this.value=Math.max(0,this.value-r),this}[Symbol.toPrimitive](r){switch(r){case"string":return this.value.toString();case"number":return this.value;default:return null}}},Cr=class extends ta{constructor(r=Number(e.wowCubes)){super("wowCubes",r)}open(r,n=!1,a=!1){let s=n?Number(this):a?r:Math.min(Number(this),r);r===1&&e.cubeBlessings.accelerator>=2e11&&e.achievements[246]<1&&F(246),a||this.sub(s),e.cubeOpenedDaily+=s;let o=e.shopUpgrades.cubeToQuark?1.5:1,c=Number(this.checkQuarkGain(5,o,e.cubeOpenedDaily)),p=Math.max(0,c-e.cubeQuarkDaily);e.cubeQuarkDaily+=p,e.worlds.add(p,!1),s*=1+e.researches[138]/1e3,s*=1+.8*e.researches[168]/1e3,s*=1+.6*e.researches[198]/1e3,s=Math.floor(s);let f=s%20,g=Math.floor(s/20);g>0&&e.cubeUpgrades[13]===1&&(f+=g),g>0&&e.cubeUpgrades[23]===1&&(f+=g),g>0&&e.cubeUpgrades[33]===1&&(f+=g),g+=100/100*Math.floor(f/20),f=f%20;let h=Object.keys(e.cubeBlessings);for(let b of h)e.cubeBlessings[b]+=Os[b].weight*g*(1+Math.floor(z("ascension",e.challengecompletions[12])));for(let b=0;b0&&(e.platonicBlessings[C]+=g);let h=["hypercubeBonus","taxes","scoreBonus","globalSpeed"];for(let C=0;C=x&&f!==0&&(e.platonicBlessings[h[C]]+=1,f-=1)}let b=[Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(396*f/4e4)],y=["cubes","tesseracts","hypercubes","platonics"];for(let C=0;C0){let C=Math.floor(s*Math.max(0,Math.min(1,(m.log(e.ascendShards.add(1),10)-1e5)/9e5)));e.wowHypercubes.open(C,!1,!0)}}};var lg=Hr(ig());var vl=t=>t instanceof m||typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"mantissa"in t&&"exponent"in t,Ie=(t=0)=>t<=Number.MAX_SAFE_INTEGER?1:2**Math.floor(Math.log2(t)-52),xe=t=>(t=Array.isArray(t)?t:Object.values(t),t.reduce((r,n)=>r+n,0)),Oe=t=>t.reduce((r,n)=>r*n),cg=t=>Array.from([...t.keys()]).sort((r,n)=>t[r]l(t);var Su=(t,r,n)=>{for(let a=0;a{let a=l(t);for(let s of r)a.classList.add(s);for(let s of n)a.classList.remove(s)},Ns=t=>{try{return window.btoa(t)}catch(r){return console.error("An error occurred:",r),null}},_o=t=>{let r="th";return t%10===1&&(r=t%100===11?"th":"st"),t%10===2&&(r=t%100===12?"th":"nd"),t%10===3&&(r=t%100===13?"th":"rd"),d(t,0,!0)+r},xy=t=>Object.entries({d:Math.floor(t/864e5),h:Math.floor(t/36e5)%24,m:Math.floor(t/6e4)%60,s:Math.floor(t/1e3)%60}).filter(r=>r[1]>0).map(r=>`${r[1]}${r[0]}`).join(" ")||"0s",Vr=t=>xy(1e3*t),$o=t=>{let r="";for(let n=0;n255?"_":t[n]}return r};function na(t,r){if(!t)throw new TypeError("assertion failed",{cause:new TypeError(r)})}function Cl(t,r,n){return tn?r:t}var Da=()=>{let t,r,n=new Promise((a,s)=>{t=a,r=s});return{resolve:t,reject:r,promise:n}},cn=t=>(0,lg.default)(t,r=>vl(r)||r instanceof m?new m(r):r);function un(t){let r=!1,n;return(...a)=>(r||(r=!0,n=t(...a)),n)}var Tu=()=>{let t=e.singularityCount,r=t>36?u.t("singularity.penalties.platonicCosts",{multiplier:d(He("Platonic Costs",t),2,!0)}):'???????? ??????? ????? ??? ?????????? ?? ??? (37)',n=t>50?u.t("singularity.penalties.hepteractCosts",{multiplier:d(He("Hepteract Costs",t),2,!0)}):'????????? ????? ????? ??? ?????????? ?? ??? (51)',a=`${My(t)}
${u.t("singularity.penalties.globalSpeed",{divisor:d(He("Global Speed",t),2,!0)})} +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jp(t){return Hp(t)||Fp(t)||Qp(t)||qp()}function Vp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Wp(t){for(var r=1;r1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.init(r,n)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=a.prefix||"i18next:",this.logger=n||b1,this.options=a,this.debug=a.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,a=new Array(n),s=0;s1?a-1:0),o=1;o-1?p.replace(/###/g,"."):p}function s(){return!t||typeof t=="string"}for(var o=typeof r!="string"?[].concat(r):r.split(".");o.length>1;){if(s())return{};var c=a(o.shift());!t[c]&&n&&(t[c]=new n),Object.prototype.hasOwnProperty.call(t,c)?t=t[c]:t={}}return s()?{}:{obj:t,k:a(o.shift())}}function Kp(t,r,n){var a=nu(t,r,Object),s=a.obj,o=a.k;s[o]=n}function C1(t,r,n,a){var s=nu(t,r,Object),o=s.obj,c=s.k;o[c]=o[c]||[],a&&(o[c]=o[c].concat(n)),a||o[c].push(n)}function nl(t,r){var n=nu(t,r),a=n.obj,s=n.k;if(a)return a[s]}function w1(t,r,n){var a=nl(t,n);return a!==void 0?a:nl(r,n)}function df(t,r,n){for(var a in r)a!=="__proto__"&&a!=="constructor"&&(a in t?typeof t[a]=="string"||t[a]instanceof String||typeof r[a]=="string"||r[a]instanceof String?n&&(t[a]=r[a]):df(t[a],r[a],n):t[a]=r[a]);return t}function Ps(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var x1={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function M1(t){return typeof t=="string"?t.replace(/[&<>"'\/]/g,function(r){return x1[r]}):t}var ol=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,S1=[" ",",","?","!",";"];function T1(t,r,n){r=r||"",n=n||"";var a=S1.filter(function(p){return r.indexOf(p)<0&&n.indexOf(p)<0});if(a.length===0)return!0;var s=new RegExp("(".concat(a.map(function(p){return p==="?"?"\\?":p}).join("|"),")")),o=!s.test(t);if(!o){var c=t.indexOf(n);c>0&&!s.test(t.substring(0,c))&&(o=!0)}return o}function al(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(t){if(t[r])return t[r];for(var a=r.split(n),s=t,o=0;oo+c;)c++,p=a.slice(o,o+c).join(n),f=s[p];if(f===void 0)return;if(f===null)return null;if(r.endsWith(p)){if(typeof f=="string")return f;if(p&&typeof f[p]=="string")return f[p]}var g=a.slice(o+c).join(n);return g?al(f,g,n):void 0}s=s[a[o]]}return s}}function Xp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function tl(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var A1=function(t){Eo(n,t);var r=k1(n);function n(a){var s,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return Fr(this,n),s=r.call(this),ol&&Xn.call(an(s)),s.data=a||{},s.options=o,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.options.ignoreJSONStructure===void 0&&(s.options.ignoreJSONStructure=!0),s}return Qr(n,[{key:"addNamespaces",value:function(s){this.options.ns.indexOf(s)<0&&this.options.ns.push(s)}},{key:"removeNamespaces",value:function(s){var o=this.options.ns.indexOf(s);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},f=p.keySeparator!==void 0?p.keySeparator:this.options.keySeparator,g=p.ignoreJSONStructure!==void 0?p.ignoreJSONStructure:this.options.ignoreJSONStructure,h=[s,o];c&&typeof c!="string"&&(h=h.concat(c)),c&&typeof c=="string"&&(h=h.concat(f?c.split(f):c)),s.indexOf(".")>-1&&(h=s.split("."));var b=nl(this.data,h);return b||!g||typeof c!="string"?b:al(this.data&&this.data[s]&&this.data[s][o],c,f)}},{key:"addResource",value:function(s,o,c,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},g=f.keySeparator!==void 0?f.keySeparator:this.options.keySeparator,h=[s,o];c&&(h=h.concat(g?c.split(g):c)),s.indexOf(".")>-1&&(h=s.split("."),p=o,o=h[1]),this.addNamespaces(o),Kp(this.data,h,p),f.silent||this.emit("added",s,o,c,p)}},{key:"addResources",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var f in c)(typeof c[f]=="string"||Object.prototype.toString.apply(c[f])==="[object Array]")&&this.addResource(s,o,f,c[f],{silent:!0});p.silent||this.emit("added",s,o,c)}},{key:"addResourceBundle",value:function(s,o,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},h=[s,o];s.indexOf(".")>-1&&(h=s.split("."),p=c,c=o,o=h[1]),this.addNamespaces(o);var b=nl(this.data,h)||{};p?df(b,c,f):b=tl(tl({},b),c),Kp(this.data,h,b),g.silent||this.emit("added",s,o,c)}},{key:"removeResourceBundle",value:function(s,o){this.hasResourceBundle(s,o)&&delete this.data[s][o],this.removeNamespaces(o),this.emit("removed",s,o)}},{key:"hasResourceBundle",value:function(s,o){return this.getResource(s,o)!==void 0}},{key:"getResourceBundle",value:function(s,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?tl(tl({},{}),this.getResource(s,o)):this.getResource(s,o)}},{key:"getDataByLanguage",value:function(s){return this.data[s]}},{key:"hasLanguageSomeTranslations",value:function(s){var o=this.getDataByLanguage(s),c=o&&Object.keys(o)||[];return!!c.find(function(p){return o[p]&&Object.keys(o[p]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Xn),pf={processors:{},addPostProcessor:function(r){this.processors[r.name]=r},handle:function(r,n,a,s,o){var c=this;return r.forEach(function(p){c.processors[p]&&(n=c.processors[p].process(n,a,s,o))}),n}};function Zp(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function Dt(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}var Yp={},Jp=function(t){Eo(n,t);var r=P1(n);function n(a){var s,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Fr(this,n),s=r.call(this),ol&&Xn.call(an(s)),v1(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],a,an(s)),s.options=o,s.options.keySeparator===void 0&&(s.options.keySeparator="."),s.logger=on.create("translator"),s}return Qr(n,[{key:"changeLanguage",value:function(s){s&&(this.language=s)}},{key:"exists",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(s==null)return!1;var c=this.resolve(s,o);return c&&c.res!==void 0}},{key:"extractFromKey",value:function(s,o){var c=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");var p=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,f=o.ns||this.options.defaultNS||[],g=c&&s.indexOf(c)>-1,h=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!T1(s,c,p);if(g&&!h){var b=s.match(this.interpolator.nestingRegexp);if(b&&b.length>0)return{key:s,namespaces:f};var y=s.split(c);(c!==p||c===p&&this.options.ns.indexOf(y[0])>-1)&&(f=y.shift()),s=y.join(p)}return typeof f=="string"&&(f=[f]),{key:s,namespaces:f}}},{key:"translate",value:function(s,o,c){var p=this;if($t(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),$t(o)==="object"&&(o=Dt({},o)),o||(o={}),s==null)return"";Array.isArray(s)||(s=[String(s)]);var f=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,g=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,h=this.extractFromKey(s[s.length-1],o),b=h.key,y=h.namespaces,C=y[y.length-1],x=o.lng||this.language,D=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x&&x.toLowerCase()==="cimode"){if(D){var $=o.nsSeparator||this.options.nsSeparator;return f?{res:"".concat(C).concat($).concat(b),usedKey:b,exactUsedKey:b,usedLng:x,usedNS:C}:"".concat(C).concat($).concat(b)}return f?{res:b,usedKey:b,exactUsedKey:b,usedLng:x,usedNS:C}:b}var L=this.resolve(s,o),E=L&&L.res,H=L&&L.usedKey||b,I=L&&L.exactUsedKey||b,N=Object.prototype.toString.apply(E),k=["[object Number]","[object Function]","[object RegExp]"],A=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,Q=!this.i18nFormat||this.i18nFormat.handleAsObject,J=typeof E!="string"&&typeof E!="boolean"&&typeof E!="number";if(Q&&E&&J&&k.indexOf(N)<0&&!(typeof A=="string"&&N==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var M=this.options.returnedObjectHandler?this.options.returnedObjectHandler(H,E,Dt(Dt({},o),{},{ns:y})):"key '".concat(b," (").concat(this.language,")' returned an object instead of string.");return f?(L.res=M,L):M}if(g){var j=N==="[object Array]",ae=j?[]:{},ge=j?I:H;for(var Je in E)if(Object.prototype.hasOwnProperty.call(E,Je)){var ut="".concat(ge).concat(g).concat(Je);ae[Je]=this.translate(ut,Dt(Dt({},o),{joinArrays:!1,ns:y})),ae[Je]===ut&&(ae[Je]=E[Je])}E=ae}}else if(Q&&typeof A=="string"&&N==="[object Array]")E=E.join(A),E&&(E=this.extendTranslation(E,s,o,c));else{var ht=!1,Ot=!1,xt=o.count!==void 0&&typeof o.count!="string",Nt=n.hasDefaultValue(o),ve=xt?this.pluralResolver.getSuffix(x,o.count,o):"",ue=o["defaultValue".concat(ve)]||o.defaultValue;!this.isValidLookup(E)&&Nt&&(ht=!0,E=ue),this.isValidLookup(E)||(Ot=!0,E=b);var le=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,be=le&&Ot?void 0:E,me=Nt&&ue!==E&&this.options.updateMissing;if(Ot||ht||me){if(this.logger.log(me?"updateKey":"missingKey",x,C,b,me?ue:E),g){var ke=this.resolve(b,Dt(Dt({},o),{},{keySeparator:!1}));ke&&ke.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.")}var Ye=[],O=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&O&&O[0])for(var St=0;St1&&arguments[1]!==void 0?arguments[1]:{},p,f,g,h,b;return typeof s=="string"&&(s=[s]),s.forEach(function(y){if(!o.isValidLookup(p)){var C=o.extractFromKey(y,c),x=C.key;f=x;var D=C.namespaces;o.options.fallbackNS&&(D=D.concat(o.options.fallbackNS));var $=c.count!==void 0&&typeof c.count!="string",L=$&&!c.ordinal&&c.count===0&&o.pluralResolver.shouldUseIntlApi(),E=c.context!==void 0&&(typeof c.context=="string"||typeof c.context=="number")&&c.context!=="",H=c.lngs?c.lngs:o.languageUtils.toResolveHierarchy(c.lng||o.language,c.fallbackLng);D.forEach(function(I){o.isValidLookup(p)||(b=I,!Yp["".concat(H[0],"-").concat(I)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(b)&&(Yp["".concat(H[0],"-").concat(I)]=!0,o.logger.warn('key "'.concat(f,'" for languages "').concat(H.join(", "),`" won't get resolved as namespace "`).concat(b,'" 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!!!")),H.forEach(function(N){if(!o.isValidLookup(p)){h=N;var k=[x];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(k,x,N,I,c);else{var A;$&&(A=o.pluralResolver.getSuffix(N,c.count,c));var Q="".concat(o.options.pluralSeparator,"zero");if($&&(k.push(x+A),L&&k.push(x+Q)),E){var J="".concat(x).concat(o.options.contextSeparator).concat(c.context);k.push(J),$&&(k.push(J+A),L&&k.push(J+Q))}}for(var M;M=k.pop();)o.isValidLookup(p)||(g=M,p=o.getResource(N,I,M,c))}}))})}}),{res:p,usedKey:f,exactUsedKey:g,usedLng:h,usedNS:b}}},{key:"isValidLookup",value:function(s){return s!==void 0&&!(!this.options.returnNull&&s===null)&&!(!this.options.returnEmptyString&&s==="")}},{key:"getResource",value:function(s,o,c){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(s,o,c,p):this.resourceStore.getResource(s,o,c,p)}}],[{key:"hasDefaultValue",value:function(s){var o="defaultValue";for(var c in s)if(Object.prototype.hasOwnProperty.call(s,c)&&o===c.substring(0,o.length)&&s[c]!==void 0)return!0;return!1}}]),n}(Xn);function ru(t){return t.charAt(0).toUpperCase()+t.slice(1)}var ef=function(){function t(r){Fr(this,t),this.options=r,this.supportedLngs=this.options.supportedLngs||!1,this.logger=on.create("languageUtils")}return Qr(t,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var a=n.split("-");return a.length===2||(a.pop(),a[a.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(a.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var a=n.split("-");return this.formatLanguageCode(a[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var a=["hans","hant","latn","cyrl","cans","mong","arab"],s=n.split("-");return this.options.lowerCaseLng?s=s.map(function(o){return o.toLowerCase()}):s.length===2?(s[0]=s[0].toLowerCase(),s[1]=s[1].toUpperCase(),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=ru(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()),a.indexOf(s[1].toLowerCase())>-1&&(s[1]=ru(s[1].toLowerCase())),a.indexOf(s[2].toLowerCase())>-1&&(s[2]=ru(s[2].toLowerCase()))),s.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var a=this;if(!n)return null;var s;return n.forEach(function(o){if(!s){var c=a.formatLanguageCode(o);(!a.options.supportedLngs||a.isSupportedCode(c))&&(s=c)}}),!s&&this.options.supportedLngs&&n.forEach(function(o){if(!s){var c=a.getLanguagePartFromCode(o);if(a.isSupportedCode(c))return s=c;s=a.options.supportedLngs.find(function(p){if(p===c)return p;if(!(p.indexOf("-")<0&&c.indexOf("-")<0)&&p.indexOf(c)===0)return p})}}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}},{key:"getFallbackCodes",value:function(n,a){if(!n)return[];if(typeof n=="function"&&(n=n(a)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!a)return n.default||[];var s=n[a];return s||(s=n[this.getScriptPartFromCode(a)]),s||(s=n[this.formatLanguageCode(a)]),s||(s=n[this.getLanguagePartFromCode(a)]),s||(s=n.default),s||[]}},{key:"toResolveHierarchy",value:function(n,a){var s=this,o=this.getFallbackCodes(a||this.options.fallbackLng||[],n),c=[],p=function(g){g&&(s.isSupportedCode(g)?c.push(g):s.logger.warn("rejecting language code not found in supportedLngs: ".concat(g)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&p(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&p(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&p(this.getLanguagePartFromCode(n))):typeof n=="string"&&p(this.formatLanguageCode(n)),o.forEach(function(f){c.indexOf(f)<0&&p(s.formatLanguageCode(f))}),c}}]),t}(),O1=[{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}],U1={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}},B1=["v1","v2","v3"],tf={zero:0,one:1,two:2,few:3,many:4,other:5};function R1(){var t={};return O1.forEach(function(r){r.lngs.forEach(function(n){t[n]={numbers:r.nr,plurals:U1[r.fc]}})}),t}var I1=function(){function t(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Fr(this,t),this.languageUtils=r,this.options=n,this.logger=on.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(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=R1()}return Qr(t,[{key:"addRule",value:function(n,a){this.rules[n]=a}},{key:"getRule",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:a.ordinal?"ordinal":"cardinal"})}catch(s){return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=this.getRule(n,a);return this.shouldUseIntlApi()?s&&s.resolvedOptions().pluralCategories.length>1:s&&s.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,s).map(function(o){return"".concat(a).concat(o)})}},{key:"getSuffixes",value:function(n){var a=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,s);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(c,p){return tf[c]-tf[p]}).map(function(c){return"".concat(a.options.prepend).concat(c)}):o.numbers.map(function(c){return a.getSuffix(n,c,s)}):[]}},{key:"getSuffix",value:function(n,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,s);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(a)):this.getSuffixRetroCompatible(o,a):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,a){var s=this,o=n.noAbs?n.plurals(a):n.plurals(Math.abs(a)),c=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(c===2?c="plural":c===1&&(c=""));var p=function(){return s.options.prepend&&c.toString()?s.options.prepend+c.toString():c.toString()};return this.options.compatibilityJSON==="v1"?c===1?"":typeof c=="number"?"_plural_".concat(c.toString()):p():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?p():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!B1.includes(this.options.compatibilityJSON)}}]),t}();function rf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function jr(t){for(var r=1;r3&&arguments[3]!==void 0?arguments[3]:".",s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,o=w1(t,r,n);return!o&&s&&typeof n=="string"&&(o=al(t,n,a),o===void 0&&(o=al(r,n,a))),o}var N1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("interpolator"),this.options=r,this.format=r.interpolation&&r.interpolation.format||function(n){return n},this.init(r)}return Qr(t,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var a=n.interpolation;this.escape=a.escape!==void 0?a.escape:M1,this.escapeValue=a.escapeValue!==void 0?a.escapeValue:!0,this.useRawValueToEscape=a.useRawValueToEscape!==void 0?a.useRawValueToEscape:!1,this.prefix=a.prefix?Ps(a.prefix):a.prefixEscaped||"{{",this.suffix=a.suffix?Ps(a.suffix):a.suffixEscaped||"}}",this.formatSeparator=a.formatSeparator?a.formatSeparator:a.formatSeparator||",",this.unescapePrefix=a.unescapeSuffix?"":a.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":a.unescapeSuffix||"",this.nestingPrefix=a.nestingPrefix?Ps(a.nestingPrefix):a.nestingPrefixEscaped||Ps("$t("),this.nestingSuffix=a.nestingSuffix?Ps(a.nestingSuffix):a.nestingSuffixEscaped||Ps(")"),this.nestingOptionsSeparator=a.nestingOptionsSeparator?a.nestingOptionsSeparator:a.nestingOptionsSeparator||",",this.maxReplaces=a.maxReplaces?a.maxReplaces:1e3,this.alwaysFormat=a.alwaysFormat!==void 0?a.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var a="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(a,"g");var s="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(s,"g")}},{key:"interpolate",value:function(n,a,s,o){var c=this,p,f,g,h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function b($){return $.replace(/\$/g,"$$$$")}var y=function(L){if(L.indexOf(c.formatSeparator)<0){var E=nf(a,h,L,c.options.keySeparator,c.options.ignoreJSONStructure);return c.alwaysFormat?c.format(E,void 0,s,jr(jr(jr({},o),a),{},{interpolationkey:L})):E}var H=L.split(c.formatSeparator),I=H.shift().trim(),N=H.join(c.formatSeparator).trim();return c.format(nf(a,h,I,c.options.keySeparator,c.options.ignoreJSONStructure),N,s,jr(jr(jr({},o),a),{},{interpolationkey:I}))};this.resetRegExp();var C=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,x=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,D=[{regex:this.regexpUnescape,safeValue:function(L){return b(L)}},{regex:this.regexp,safeValue:function(L){return c.escapeValue?b(c.escape(L)):b(L)}}];return D.forEach(function($){for(g=0;p=$.regex.exec(n);){var L=p[1].trim();if(f=y(L),f===void 0)if(typeof C=="function"){var E=C(n,p,o);f=typeof E=="string"?E:""}else if(o&&Object.prototype.hasOwnProperty.call(o,L))f="";else if(x){f=p[0];continue}else c.logger.warn("missed to pass in variable ".concat(L," for interpolating ").concat(n)),f="";else typeof f!="string"&&!c.useRawValueToEscape&&(f=zp(f));var H=$.safeValue(f);if(n=n.replace(p[0],H),x?($.regex.lastIndex+=f.length,$.regex.lastIndex-=p[0].length):$.regex.lastIndex=0,g++,g>=c.maxReplaces)break}}),n}},{key:"nest",value:function(n,a){var s=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},c,p,f;function g(C,x){var D=this.nestingOptionsSeparator;if(C.indexOf(D)<0)return C;var $=C.split(new RegExp("".concat(D,"[ ]*{"))),L="{".concat($[1]);C=$[0],L=this.interpolate(L,f);var E=L.match(/'/g),H=L.match(/"/g);(E&&E.length%2===0&&!H||H.length%2!==0)&&(L=L.replace(/'/g,'"'));try{f=JSON.parse(L),x&&(f=jr(jr({},x),f))}catch(I){return this.logger.warn("failed parsing options string in nesting for key ".concat(C),I),"".concat(C).concat(D).concat(L)}return delete f.defaultValue,C}for(;c=this.nestingRegexp.exec(n);){var h=[];f=jr({},o),f=f.replace&&typeof f.replace!="string"?f.replace:f,f.applyPostProcessor=!1,delete f.defaultValue;var b=!1;if(c[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(c[1])){var y=c[1].split(this.formatSeparator).map(function(C){return C.trim()});c[1]=y.shift(),h=y,b=!0}if(p=a(g.call(this,c[1].trim(),f),f),p&&c[0]===n&&typeof p!="string")return p;typeof p!="string"&&(p=zp(p)),p||(this.logger.warn("missed to resolve ".concat(c[1]," for nesting ").concat(n)),p=""),b&&(p=h.reduce(function(C,x){return s.format(C,x,o.lng,jr(jr({},o),{},{interpolationkey:c[1].trim()}))},p.trim())),n=n.replace(c[0],p),this.regexp.lastIndex=0}return n}}]),t}();function af(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function kn(t){for(var r=1;r-1){var a=t.split("(");r=a[0].toLowerCase().trim();var s=a[1].substring(0,a[1].length-1);if(r==="currency"&&s.indexOf(":")<0)n.currency||(n.currency=s.trim());else if(r==="relativetime"&&s.indexOf(":")<0)n.range||(n.range=s.trim());else{var o=s.split(";");o.forEach(function(c){if(c){var p=c.split(":"),f=jp(p),g=f[0],h=f.slice(1),b=h.join(":").trim().replace(/^'+|'+$/g,"");n[g.trim()]||(n[g.trim()]=b),b==="false"&&(n[g.trim()]=!1),b==="true"&&(n[g.trim()]=!0),isNaN(b)||(n[g.trim()]=parseInt(b,10))}})}}return{formatName:r,formatOptions:n}}function Es(t){var r={};return function(a,s,o){var c=s+JSON.stringify(o),p=r[c];return p||(p=t(s,o),r[c]=p),p(a)}}var $1=function(){function t(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Fr(this,t),this.logger=on.create("formatter"),this.options=r,this.formats={number:Es(function(n,a){var s=new Intl.NumberFormat(n,kn({},a));return function(o){return s.format(o)}}),currency:Es(function(n,a){var s=new Intl.NumberFormat(n,kn(kn({},a),{},{style:"currency"}));return function(o){return s.format(o)}}),datetime:Es(function(n,a){var s=new Intl.DateTimeFormat(n,kn({},a));return function(o){return s.format(o)}}),relativetime:Es(function(n,a){var s=new Intl.RelativeTimeFormat(n,kn({},a));return function(o){return s.format(o,a.range||"day")}}),list:Es(function(n,a){var s=new Intl.ListFormat(n,kn({},a));return function(o){return s.format(o)}})},this.init(r)}return Qr(t,[{key:"init",value:function(n){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},s=a.interpolation;this.formatSeparator=s.formatSeparator?s.formatSeparator:s.formatSeparator||","}},{key:"add",value:function(n,a){this.formats[n.toLowerCase().trim()]=a}},{key:"addCached",value:function(n,a){this.formats[n.toLowerCase().trim()]=Es(a)}},{key:"format",value:function(n,a,s){var o=this,c=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},p=a.split(this.formatSeparator),f=p.reduce(function(g,h){var b=_1(h),y=b.formatName,C=b.formatOptions;if(o.formats[y]){var x=g;try{var D=c&&c.formatParams&&c.formatParams[c.interpolationkey]||{},$=D.locale||D.lng||c.locale||c.lng||s;x=o.formats[y](g,$,kn(kn(kn({},C),c),D))}catch(L){o.logger.warn(L)}return x}else o.logger.warn("there was no format function for ".concat(y));return g},n);return f}}]),t}();function sf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function of(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function H1(t,r){t.pending[r]!==void 0&&(delete t.pending[r],t.pendingCount--)}var F1=function(t){Eo(n,t);var r=D1(n);function n(a,s,o){var c,p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return Fr(this,n),c=r.call(this),ol&&Xn.call(an(c)),c.backend=a,c.store=s,c.services=o,c.languageUtils=o.languageUtils,c.options=p,c.logger=on.create("backendConnector"),c.waitingReads=[],c.maxParallelReads=p.maxParallelReads||10,c.readingCalls=0,c.maxRetries=p.maxRetries>=0?p.maxRetries:5,c.retryTimeout=p.retryTimeout>=1?p.retryTimeout:350,c.state={},c.queue=[],c.backend&&c.backend.init&&c.backend.init(o,p.backend,p),c}return Qr(n,[{key:"queueLoad",value:function(s,o,c,p){var f=this,g={},h={},b={},y={};return s.forEach(function(C){var x=!0;o.forEach(function(D){var $="".concat(C,"|").concat(D);!c.reload&&f.store.hasResourceBundle(C,D)?f.state[$]=2:f.state[$]<0||(f.state[$]===1?h[$]===void 0&&(h[$]=!0):(f.state[$]=1,x=!1,h[$]===void 0&&(h[$]=!0),g[$]===void 0&&(g[$]=!0),y[D]===void 0&&(y[D]=!0)))}),x||(b[C]=!0)}),(Object.keys(g).length||Object.keys(h).length)&&this.queue.push({pending:h,pendingCount:Object.keys(h).length,loaded:{},errors:[],callback:p}),{toLoad:Object.keys(g),pending:Object.keys(h),toLoadLanguages:Object.keys(b),toLoadNamespaces:Object.keys(y)}}},{key:"loaded",value:function(s,o,c){var p=s.split("|"),f=p[0],g=p[1];o&&this.emit("failedLoading",f,g,o),c&&this.store.addResourceBundle(f,g,c),this.state[s]=o?-1:2;var h={};this.queue.forEach(function(b){C1(b.loaded,[f],g),H1(b,s),o&&b.errors.push(o),b.pendingCount===0&&!b.done&&(Object.keys(b.loaded).forEach(function(y){h[y]||(h[y]={});var C=b.loaded[y];C.length&&C.forEach(function(x){h[y][x]===void 0&&(h[y][x]=!0)})}),b.done=!0,b.errors.length?b.callback(b.errors):b.callback())}),this.emit("loaded",h),this.queue=this.queue.filter(function(b){return!b.done})}},{key:"read",value:function(s,o,c){var p=this,f=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,g=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,h=arguments.length>5?arguments[5]:void 0;if(!s.length)return h(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:s,ns:o,fcName:c,tried:f,wait:g,callback:h});return}this.readingCalls++;var b=function(D,$){if(p.readingCalls--,p.waitingReads.length>0){var L=p.waitingReads.shift();p.read(L.lng,L.ns,L.fcName,L.tried,L.wait,L.callback)}if(D&&$&&f2&&arguments[2]!==void 0?arguments[2]:{},f=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."),f&&f();typeof s=="string"&&(s=this.languageUtils.toResolveHierarchy(s)),typeof o=="string"&&(o=[o]);var g=this.queueLoad(s,o,p,f);if(!g.toLoad.length)return g.pending.length||f(),null;g.toLoad.forEach(function(h){c.loadOne(h)})}},{key:"load",value:function(s,o,c){this.prepareLoading(s,o,{},c)}},{key:"reload",value:function(s,o,c){this.prepareLoading(s,o,{reload:!0},c)}},{key:"loadOne",value:function(s){var o=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",p=s.split("|"),f=p[0],g=p[1];this.read(f,g,"read",void 0,void 0,function(h,b){h&&o.logger.warn("".concat(c,"loading namespace ").concat(g," for language ").concat(f," failed"),h),!h&&b&&o.logger.log("".concat(c,"loaded namespace ").concat(g," for language ").concat(f),b),o.loaded(s,h,b)})}},{key:"saveMissing",value:function(s,o,c,p,f){var g=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},h=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(c,'" as the namespace "').concat(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!!!");return}if(!(c==null||c==="")){if(this.backend&&this.backend.create){var b=of(of({},g),{},{isUpdate:f}),y=this.backend.create.bind(this.backend);if(y.length<6)try{var C;y.length===5?C=y(s,o,c,p,b):C=y(s,o,c,p),C&&typeof C.then=="function"?C.then(function(x){return h(null,x)}).catch(h):h(null,C)}catch(x){h(x)}else y(s,o,c,p,h,b)}!s||!s[0]||this.store.addResource(s[0],o,c,p)}}}]),n}(Xn);function lf(){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:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(r){var n={};if($t(r[1])==="object"&&(n=r[1]),typeof r[1]=="string"&&(n.defaultValue=r[1]),typeof r[2]=="string"&&(n.tDescription=r[2]),$t(r[2])==="object"||$t(r[3])==="object"){var a=r[3]||r[2];Object.keys(a).forEach(function(s){n[s]=a[s]})}return n},interpolation:{escapeValue:!0,format:function(r,n,a,s){return r},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function cf(t){return typeof t.ns=="string"&&(t.ns=[t.ns]),typeof t.fallbackLng=="string"&&(t.fallbackLng=[t.fallbackLng]),typeof t.fallbackNS=="string"&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&t.supportedLngs.indexOf("cimode")<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function uf(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),n.push.apply(n,a)}return n}function sn(t){for(var r=1;r"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function rl(){}function j1(t){var r=Object.getOwnPropertyNames(Object.getPrototypeOf(t));r.forEach(function(n){typeof t[n]=="function"&&(t[n]=t[n].bind(t))})}var sl=function(t){Eo(n,t);var r=Q1(n);function n(){var a,s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(Fr(this,n),a=r.call(this),ol&&Xn.call(an(a)),a.options=cf(s),a.services={},a.logger=on,a.modules={external:[]},j1(an(a)),o&&!a.isInitialized&&!s.isClone){if(!a.options.initImmediate)return a.init(s,o),As(a,an(a));setTimeout(function(){a.init(s,o)},0)}return a}return Qr(n,[{key:"init",value:function(){var s=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(c=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var p=lf();this.options=sn(sn(sn({},p),this.options),cf(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=sn(sn({},p.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function f(L){return L?typeof L=="function"?new L:L:null}if(!this.options.isClone){this.modules.logger?on.init(f(this.modules.logger),this.options):on.init(null,this.options);var g;this.modules.formatter?g=this.modules.formatter:typeof Intl<"u"&&(g=$1);var h=new ef(this.options);this.store=new A1(this.options.resources,this.options);var b=this.services;b.logger=on,b.resourceStore=this.store,b.languageUtils=h,b.pluralResolver=new I1(h,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),g&&(!this.options.interpolation.format||this.options.interpolation.format===p.interpolation.format)&&(b.formatter=f(g),b.formatter.init(b,this.options),this.options.interpolation.format=b.formatter.format.bind(b.formatter)),b.interpolator=new N1(this.options),b.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},b.backendConnector=new F1(f(this.modules.backend),b.resourceStore,b,this.options),b.backendConnector.on("*",function(L){for(var E=arguments.length,H=new Array(E>1?E-1:0),I=1;I1?E-1:0),I=1;I0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var C=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];C.forEach(function(L){s[L]=function(){var E;return(E=s.store)[L].apply(E,arguments)}});var x=["addResource","addResources","addResourceBundle","removeResourceBundle"];x.forEach(function(L){s[L]=function(){var E;return(E=s.store)[L].apply(E,arguments),s}});var D=Oo(),$=function(){var E=function(I,N){s.isInitialized&&!s.initializedStoreOnce&&s.logger.warn("init: i18next is already initialized. You should call init just once!"),s.isInitialized=!0,s.options.isClone||s.logger.log("initialized",s.options),s.emit("initialized",s.options),D.resolve(N),c(I,N)};if(s.languages&&s.options.compatibilityAPI!=="v1"&&!s.isInitialized)return E(null,s.t.bind(s));s.changeLanguage(s.options.lng,E)};return this.options.resources||!this.options.initImmediate?$():setTimeout($,0),D}},{key:"loadResources",value:function(s){var o=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rl,p=c,f=typeof s=="string"?s:this.language;if(typeof s=="function"&&(p=s),!this.options.resources||this.options.partialBundledLanguages){if(f&&f.toLowerCase()==="cimode")return p();var g=[],h=function(C){if(C){var x=o.services.languageUtils.toResolveHierarchy(C);x.forEach(function(D){g.indexOf(D)<0&&g.push(D)})}};if(f)h(f);else{var b=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);b.forEach(function(y){return h(y)})}this.options.preload&&this.options.preload.forEach(function(y){return h(y)}),this.services.backendConnector.load(g,this.options.ns,function(y){!y&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),p(y)})}else p(null)}},{key:"reloadResources",value:function(s,o,c){var p=Oo();return s||(s=this.languages),o||(o=this.options.ns),c||(c=rl),this.services.backendConnector.reload(s,o,function(f){p.resolve(),c(f)}),p}},{key:"use",value:function(s){if(!s)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!s.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return s.type==="backend"&&(this.modules.backend=s),(s.type==="logger"||s.log&&s.warn&&s.error)&&(this.modules.logger=s),s.type==="languageDetector"&&(this.modules.languageDetector=s),s.type==="i18nFormat"&&(this.modules.i18nFormat=s),s.type==="postProcessor"&&pf.addPostProcessor(s),s.type==="formatter"&&(this.modules.formatter=s),s.type==="3rdParty"&&this.modules.external.push(s),this}},{key:"setResolvedLanguage",value:function(s){if(!(!s||!this.languages)&&!(["cimode","dev"].indexOf(s)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}}},{key:"changeLanguage",value:function(s,o){var c=this;this.isLanguageChangingTo=s;var p=Oo();this.emit("languageChanging",s);var f=function(y){c.language=y,c.languages=c.services.languageUtils.toResolveHierarchy(y),c.resolvedLanguage=void 0,c.setResolvedLanguage(y)},g=function(y,C){C?(f(C),c.translator.changeLanguage(C),c.isLanguageChangingTo=void 0,c.emit("languageChanged",C),c.logger.log("languageChanged",C)):c.isLanguageChangingTo=void 0,p.resolve(function(){return c.t.apply(c,arguments)}),o&&o(y,function(){return c.t.apply(c,arguments)})},h=function(y){!s&&!y&&c.services.languageDetector&&(y=[]);var C=typeof y=="string"?y:c.services.languageUtils.getBestMatchFromCodes(y);C&&(c.language||f(C),c.translator.language||c.translator.changeLanguage(C),c.services.languageDetector&&c.services.languageDetector.cacheUserLanguage&&c.services.languageDetector.cacheUserLanguage(C)),c.loadResources(C,function(x){g(x,C)})};return!s&&this.services.languageDetector&&!this.services.languageDetector.async?h(this.services.languageDetector.detect()):!s&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(h):this.services.languageDetector.detect(h):h(s),p}},{key:"getFixedT",value:function(s,o,c){var p=this,f=function g(h,b){var y;if($t(b)!=="object"){for(var C=arguments.length,x=new Array(C>2?C-2:0),D=2;D1&&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;var p=c.lng||this.resolvedLanguage||this.languages[0],f=this.options?this.options.fallbackLng:!1,g=this.languages[this.languages.length-1];if(p.toLowerCase()==="cimode")return!0;var h=function(C,x){var D=o.services.backendConnector.state["".concat(C,"|").concat(x)];return D===-1||D===2};if(c.precheck){var b=c.precheck(this,h);if(b!==void 0)return b}return!!(this.hasResourceBundle(p,s)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||h(p,s)&&(!f||h(g,s)))}},{key:"loadNamespaces",value:function(s,o){var c=this,p=Oo();return this.options.ns?(typeof s=="string"&&(s=[s]),s.forEach(function(f){c.options.ns.indexOf(f)<0&&c.options.ns.push(f)}),this.loadResources(function(f){p.resolve(),o&&o(f)}),p):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(s,o){var c=Oo();typeof s=="string"&&(s=[s]);var p=this.options.preload||[],f=s.filter(function(g){return p.indexOf(g)<0});return f.length?(this.options.preload=p.concat(f),this.loadResources(function(g){c.resolve(),o&&o(g)}),c):(o&&o(),Promise.resolve())}},{key:"dir",value:function(s){if(s||(s=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!s)return"rtl";var o=["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"],c=this.services&&this.services.languageUtils||new ef(lf());return o.indexOf(c.getLanguagePartFromCode(s))>-1||s.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var s=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:rl,p=sn(sn(sn({},this.options),o),{isClone:!0}),f=new n(p);(o.debug!==void 0||o.prefix!==void 0)&&(f.logger=f.logger.clone(o));var g=["store","services","language"];return g.forEach(function(h){f[h]=s[h]}),f.services=sn({},this.services),f.services.utils={hasLoadedNamespace:f.hasLoadedNamespace.bind(f)},f.translator=new Jp(f.services,f.options),f.translator.on("*",function(h){for(var b=arguments.length,y=new Array(b>1?b-1:0),C=1;C0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return new sl(t,r)});var u=sl.createInstance();u.createInstance=sl.createInstance;var ix=u.createInstance,lx=u.dir,cx=u.init,ux=u.loadResources,dx=u.reloadResources,px=u.use,fx=u.changeLanguage,gx=u.getFixedT,mx=u.t,hx=u.exists,bx=u.setDefaultNamespace,yx=u.hasLoadedNamespace,vx=u.loadNamespaces,Cx=u.loadLanguages;var au=new Map,l=t=>{let r=au.get(t);if(r)return r;let n=document.getElementById(t);if(!n)throw new TypeError(`Element with id "${t}" was not found on page?`);return au.set(t,n),n},ff=t=>au.has(t);var hf=Hr(mf()),Ht=new hf.default;var Zn=class{constructor(r){this.level=0;this.freeLevels=0;this.toggleBuy=1;var n,a,s,o;this.name=r.name,this.description=r.description,this.level=(n=r.level)!=null?n:0,this.freeLevels=(a=r.freeLevels)!=null?a:0,this.maxLevel=r.maxLevel,this.costPerLevel=r.costPerLevel,this.toggleBuy=(s=r.toggleBuy)!=null?s:1,this.effect=(o=r.effect)!=null?o:c=>({bonus:c,desc:"WIP not implemented"})}async changeToggle(){let r=await je(u.t("dynamicUpgrades.validation.setPurchaseAmount",{x:this.name})),n=Number(r);if(r===null)return B(u.t("dynamicUpgrades.validation.toggleKept",{x:d(this.toggleBuy)}));if(!Number.isInteger(r))return B(u.t("general.validation.fraction"));if(n<-1)return B(u.t("dynamicUpgrades.validation.onlyNegativeOne"));if(n===0)return B(u.t("dynamicUpgrades.validation.notZero"));this.toggleBuy=n;let a=n===-1?u.t("dynamicUpgrades.toggleMax"):u.t("dynamicUpgrades.toggle",{x:d(this.toggleBuy)});return B(a)}getEffect(){let r=this.level+Math.min(this.level,this.freeLevels)+Math.sqrt(Math.max(0,this.freeLevels-this.level));return this.effect(r)}};var Zh=Hr(iu());var zd=Hr(ll()),Yh=Hr(eu());var yr="3.1.0 January 3, 2025: The PseudoCoin Update";var Yn=new Date(Date.UTC(2025,0,12,1,3,56)),ln=!0;var Oa=()=>{let t=Object.keys(e.hypercubeBlessings);for(let r of t){let n=e.hypercubeBlessings[r],a=t.indexOf(r)+1,s=1,o=1;n>=1e3&&(s=i.benedictionDRPower[a],o*=Math.pow(1e3,1-i.benedictionDRPower[a])),i.hypercubeBonusMultiplier[a]=1+o*i.benedictionbase[a]*Math.pow(n,s)*i.platonicBonusMultiplier[4]}};var cl=()=>{let t=Object.values(e.platonicBlessings),r=[4e6,4e6,4e6,8e4,1e4,1e4,1e4,1e4];for(let n=0;n=1e20&&(o=Math.pow(o,.5)*1e10),t[n]>=r[n]&&(a=i.platonicDRPower[n],s*=Math.pow(r[n],1-i.platonicDRPower[n])),i.platonicBonusMultiplier[n]=1+s*i.platonicCubeBase[n]*Math.pow(o,a)}};var Jt=()=>{let t=9e4;e.researches[195]>0&&(t+=18e3*e.researches[195]);let r=5,n=[99,100,125,180,195];for(let p of n)r+=e.researches[p];r*=+e.octeractUpgrades.octeractExportQuarks.getEffect().bonus;let a=r,s=Math.floor(a*t/3600),o=Math.floor(e.quarkstimer*a/3600),c=ea();return{maxTime:t,perHour:a,capacity:s,gain:o,cubeMult:c}},yf=0,vf=t=>yf=t,vr=()=>yf,z1,Jn=class{constructor(r){this.QUARKS=0;this[z1]=r=>r==="number"?this.QUARKS:null;this.QUARKS=r}applyBonus(r){let n=ul();return r*(1+vr()/100)*n}add(r,n=!0){return this.QUARKS+=n?this.applyBonus(r):r,e.quarksThisSingularity+=n?this.applyBonus(r):r,this}sub(r){return this.QUARKS-=r,this.QUARKS<0&&(this.QUARKS=0),this}toString(r){return d(Math.floor(this.applyBonus(r)),0,!0)}reset(){this.QUARKS=0}};z1=Symbol.toPrimitive;var Ua=()=>{let t=[e.tesseractBlessings.accelerator,e.tesseractBlessings.multiplier,e.tesseractBlessings.offering,e.tesseractBlessings.runeExp,e.tesseractBlessings.obtainium,e.tesseractBlessings.antSpeed,e.tesseractBlessings.antSacrifice,e.tesseractBlessings.antELO,e.tesseractBlessings.talismanBonus,e.tesseractBlessings.globalSpeed];for(let r=0;r<10;r++){let n=1,a=1;t[r]>=1e3&&r!==5&&(n=i.giftDRPower[r],a*=Math.pow(1e3,1-i.giftDRPower[r])),i.tesseractBonusMultiplier[r+1]=1+a*i.giftbase[r]*Math.pow(t[r],n)*i.hypercubeBonusMultiplier[r+1]}};var Os={accelerator:{weight:4,pdf:t=>0<=t&&t<=20},multiplier:{weight:4,pdf:t=>2040506070808590950<=t&&t<=33},tesseracts:{weight:13200,pdf:t=>33669999.9999.992599.99599.9975100?B(u.t("cubes.validation.invalidPercent",{x:s})):a?this.open(Math.floor(r.value*(s/100)),s===100,!1):this.open(s,s===r.value,!1)}checkQuarkGain(r,n,a){if(a<1)return 0;let s=n*Jt().cubeMult;return Math.floor(e.worlds.applyBonus(Math.log10(a)*r*s))}checkCubesToNextQuark(r,n,a,s){let o=n*Jt().cubeMult;return Math.ceil(Math.pow(10,(a+1)/e.worlds.applyBonus(o*r))-s)}add(r){return this.value=Math.min(1e300,this.value+r),this}sub(r){return this.value=Math.max(0,this.value-r),this}[Symbol.toPrimitive](r){switch(r){case"string":return this.value.toString();case"number":return this.value;default:return null}}},Cr=class extends ta{constructor(r=Number(e.wowCubes)){super("wowCubes",r)}open(r,n=!1,a=!1){let s=n?Number(this):a?r:Math.min(Number(this),r);r===1&&e.cubeBlessings.accelerator>=2e11&&e.achievements[246]<1&&F(246),a||this.sub(s),e.cubeOpenedDaily+=s;let o=e.shopUpgrades.cubeToQuark?1.5:1,c=Number(this.checkQuarkGain(5,o,e.cubeOpenedDaily)),p=Math.max(0,c-e.cubeQuarkDaily);e.cubeQuarkDaily+=p,e.worlds.add(p,!1),s*=1+e.researches[138]/1e3,s*=1+.8*e.researches[168]/1e3,s*=1+.6*e.researches[198]/1e3,s=Math.floor(s);let f=s%20,g=Math.floor(s/20);g>0&&e.cubeUpgrades[13]===1&&(f+=g),g>0&&e.cubeUpgrades[23]===1&&(f+=g),g>0&&e.cubeUpgrades[33]===1&&(f+=g),g+=100/100*Math.floor(f/20),f=f%20;let h=Object.keys(e.cubeBlessings);for(let b of h)e.cubeBlessings[b]+=Os[b].weight*g*(1+Math.floor(z("ascension",e.challengecompletions[12])));for(let b=0;b0&&(e.platonicBlessings[C]+=g);let h=["hypercubeBonus","taxes","scoreBonus","globalSpeed"];for(let C=0;C=x&&f!==0&&(e.platonicBlessings[h[C]]+=1,f-=1)}let b=[Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(33*f/100),Math.floor(396*f/4e4)],y=["cubes","tesseracts","hypercubes","platonics"];for(let C=0;C0){let C=Math.floor(s*Math.max(0,Math.min(1,(m.log(e.ascendShards.add(1),10)-1e5)/9e5)));e.wowHypercubes.open(C,!1,!0)}}};var lg=Hr(ig());var vl=t=>t instanceof m||typeof t=="object"&&t!==null&&Object.keys(t).length===2&&"mantissa"in t&&"exponent"in t,Ie=(t=0)=>t<=Number.MAX_SAFE_INTEGER?1:2**Math.floor(Math.log2(t)-52),xe=t=>(t=Array.isArray(t)?t:Object.values(t),t.reduce((r,n)=>r+n,0)),Oe=t=>t.reduce((r,n)=>r*n),cg=t=>Array.from([...t.keys()]).sort((r,n)=>t[r]l(t);var Su=(t,r,n)=>{for(let a=0;a{let a=l(t);for(let s of r)a.classList.add(s);for(let s of n)a.classList.remove(s)},Ns=t=>{try{return window.btoa(t)}catch(r){return console.error("An error occurred:",r),null}},_o=t=>{let r="th";return t%10===1&&(r=t%100===11?"th":"st"),t%10===2&&(r=t%100===12?"th":"nd"),t%10===3&&(r=t%100===13?"th":"rd"),d(t,0,!0)+r},xy=t=>Object.entries({d:Math.floor(t/864e5),h:Math.floor(t/36e5)%24,m:Math.floor(t/6e4)%60,s:Math.floor(t/1e3)%60}).filter(r=>r[1]>0).map(r=>`${r[1]}${r[0]}`).join(" ")||"0s",Vr=t=>xy(1e3*t),$o=t=>{let r="";for(let n=0;n255?"_":t[n]}return r};function na(t,r){if(!t)throw new TypeError("assertion failed",{cause:new TypeError(r)})}function Cl(t,r,n){return tn?r:t}var Da=()=>{let t,r,n=new Promise((a,s)=>{t=a,r=s});return{resolve:t,reject:r,promise:n}},cn=t=>(0,lg.default)(t,r=>vl(r)||r instanceof m?new m(r):r);function un(t){let r=!1,n;return(...a)=>(r||(r=!0,n=t(...a)),n)}var Tu=()=>{let t=e.singularityCount,r=t>36?u.t("singularity.penalties.platonicCosts",{multiplier:d(He("Platonic Costs",t),2,!0)}):'???????? ??????? ????? ??? ?????????? ?? ??? (37)',n=t>50?u.t("singularity.penalties.hepteractCosts",{multiplier:d(He("Hepteract Costs",t),2,!0)}):'????????? ????? ????? ??? ?????????? ?? ??? (51)',a=`${My(t)}
${u.t("singularity.penalties.globalSpeed",{divisor:d(He("Global Speed",t),2,!0)})} ${u.t("singularity.penalties.ascensionSpeed",{divisor:d(He("Ascension Speed",t),2,!0)})} ${u.t("singularity.penalties.offeringGain",{divisor:d(He("Offering",t),2,!0)})} ${u.t("singularity.penalties.obtainiumGain",{divisor:d(He("Obtainium",t),2,!0)})} diff --git a/translations/zh.json b/translations/zh.json index 53e06db2b..07d97e997 100644 --- a/translations/zh.json +++ b/translations/zh.json @@ -2483,7 +2483,7 @@ "pseudocoins": { "buy": "购买伪币", "upgrades": "购买升级", - "merch": "Purchase Merch" + "merch": "购买游戏周边" } }, "offlineProgress": { @@ -3584,8 +3584,8 @@ "GOLDEN_QUARK_BUFF": "使金夸克获取数量变为原来的<>倍", "FREE_UPGRADE_PROMOCODE_BUFF": "使“每日”代码获得的免费奇点升级变为原来的<>!", "CORRUPTION_LOADOUT_SLOT_QOL": "您额外获得<>个腐化预设槽位!", - "AMBROSIA_LOADOUT_SLOT_QOL": "您额外获得<>个神肴预设槽位!", - "AUTO_POTION_FREE_POTIONS_QOL": "自动使用药剂时<>消耗药剂!", + "AMBROSIA_LOADOUT_SLOT_QOL": "您额外获得<>个神肴预设槽位!", + "AUTO_POTION_FREE_POTIONS_QOL": "自动使用药剂时并非<>消耗药剂!", "OFFLINE_TIMER_CAP_BUFF": "使离线时间上限变为原来的<>倍", "ADD_CODE_CAP_BUFF": "使“增加”代码的次数上限变为原来的<>倍" }