@openremote/or-translate 1.10.0 → 1.11.0-snapshot.20251031091914
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/umd/index.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ORTranslate=e():t.ORTranslate=e()}(self,()=>(()=>{"use strict";var t={};t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{i18next:()=>tl,translate:()=>n,OrTranslate:()=>ea});let n=t=>e=>class extends e{constructor(){super(...arguments),this._i18nextJustInitialized=!1,this._language=t.language,this.initCallback=t=>{this._i18nextJustInitialized=!0,this.requestUpdate&&this.requestUpdate()},this.langChangedCallback=()=>{this.requestUpdate&&(this._language=t.language,this.requestUpdate("_language"))}}connectedCallback(){t.language||t.on("initialized",this.initCallback),t.on("languageChanged",this.langChangedCallback),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){t.off("initialized",this.initCallback),t.off("languageChanged",this.langChangedCallback),super.disconnectedCallback&&super.disconnectedCallback()}shouldUpdate(t){return this._i18nextJustInitialized?(this._i18nextJustInitialized=!1,!0):super.shouldUpdate&&super.shouldUpdate(t)}};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:String(e)}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function a(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function p(t,e){if(e&&("object"===r(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return l(t)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var y={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},m=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.init(e,n)}return a(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||y,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,v(v({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}},{key:"clone",value:function(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new t(this.logger,e)}}]),t}()),b=function(){function t(){i(this,t),this.observers={}}return a(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)}),this}},{key:"off",value:function(t,e){if(this.observers[t]){if(!e)return void delete this.observers[t];this.observers[t]=this.observers[t].filter(function(t){return t!==e})}}},{key:"emit",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.observers[t]&&[].concat(this.observers[t]).forEach(function(t){t.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(e){e.apply(e,[t].concat(n))})}}]),t}();function O(){var t,e,n=new Promise(function(n,r){t=n,e=r});return n.resolve=t,n.reject=e,n}function k(t){return null==t?"":""+t}function S(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return i()?{}:{obj:t,k:r(o.shift())}}function x(t,e,n){var r=S(t,e,Object);r.obj[r.k]=n}function w(t,e){var n=S(t,e),r=n.obj,i=n.k;if(r)return r[i]}function P(t,e,n){var r=w(t,n);return void 0!==r?r:w(e,n)}function $(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var _={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return _[t]}):t}var A="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,E=[" ",",","?","!",";"];function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var L=function(t){c(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(r);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function r(t){var e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return i(this,r),e=n.call(this),A&&b.call(l(e)),e.data=t||{},e.options=o,void 0===e.options.keySeparator&&(e.options.keySeparator="."),void 0===e.options.ignoreJSONStructure&&(e.options.ignoreJSONStructure=!0),e}return a(r,[{key:"addNamespaces",value:function(t){0>this.options.ns.indexOf(t)&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(s=t.split("."));var a=w(this.data,s);return a||!o||"string"!=typeof n?a:function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[n])return e[n];for(var i=n.split(r),o=e,s=0;s<i.length;++s){if(!o||"string"==typeof o[i[s]]&&s+1<i.length)return;if(void 0===o[i[s]]){for(var a=2,l=i.slice(s,s+a).join(r),u=o[l];void 0===u&&i.length>s+a;)a++,u=o[l=i.slice(s,s+a).join(r)];if(void 0===u)return;if(null===u)return null;if(n.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=i.slice(s+a).join(r);if(c)return t(u,c,r);return}o=o[i[s]]}return o}}(this.data&&this.data[t]&&this.data[t][e],n,i)}},{key:"addResource",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),r=e,e=s[1]),this.addNamespaces(e),x(this.data,s,r),i.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)("string"==typeof n[i]||"[object Array]"===Object.prototype.toString.apply(n[i]))&&this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(s=t.split("."),r=n,n=e,e=s[1]),this.addNamespaces(e);var a=w(this.data,s)||{};r?function t(e,n,r){for(var i in n)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof n[i]||n[i]instanceof String?r&&(e[i]=n[i]):t(e[i],n[i],r):e[i]=n[i]);return e}(a,n,i):a=R(R({},a),n),x(this.data,s,a),o.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return(e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?R(R({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(function(t){return e[t]&&Object.keys(e[t]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(b),N={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach(function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))}),e}};function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var D={},I=function(t){c(o,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(o);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function o(t){var e,r,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,o),s=n.call(this),A&&b.call(l(s)),e=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r=l(s),e.forEach(function(e){t[e]&&(r[e]=t[e])}),s.options=a,void 0===s.options.keySeparator&&(s.options.keySeparator="."),s.logger=m.create("translator"),s}return a(o,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;var n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS||[],o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!function(t,e,n){e=e||"",n=n||"";var r=E.filter(function(t){return 0>e.indexOf(t)&&0>n.indexOf(t)});if(0===r.length)return!0;var i=new RegExp("(".concat(r.map(function(t){return"?"===t?"\\?":t}).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}(t,n,r);if(o&&!s){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};var l=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(r)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,e,n){var i=this;if("object"!==r(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var s=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,a=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,l=this.extractFromKey(t[t.length-1],e),u=l.key,c=l.namespaces,p=c[c.length-1],h=e.lng||this.language,f=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(f){var d=e.nsSeparator||this.options.nsSeparator;return s?(g.res="".concat(p).concat(d).concat(u),g):"".concat(p).concat(d).concat(u)}return s?(g.res=u,g):u}var g=this.resolve(t,e),v=g&&g.res,y=g&&g.usedKey||u,m=g&&g.exactUsedKey||u,b=Object.prototype.toString.apply(v),O=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof O||"[object Array]"!==b)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,U(U({},e),{},{ns:c})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return s?(g.res=x,g):x}if(a){var w="[object Array]"===b,P=w?[]:{},$=w?m:y;for(var _ in v)if(Object.prototype.hasOwnProperty.call(v,_)){var j="".concat($).concat(a).concat(_);P[_]=this.translate(j,U(U({},e),{joinArrays:!1,ns:c})),P[_]===j&&(P[_]=v[_])}v=P}}else if(k&&"string"==typeof O&&"[object Array]"===b)(v=v.join(O))&&(v=this.extendTranslation(v,t,e,n));else{var A=!1,E=!1,C=void 0!==e.count&&"string"!=typeof e.count,R=o.hasDefaultValue(e),L=C?this.pluralResolver.getSuffix(h,e.count,e):"",N=e["defaultValue".concat(L)]||e.defaultValue;!this.isValidLookup(v)&&R&&(A=!0,v=N),this.isValidLookup(v)||(E=!0,v=u);var T=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:v,D=R&&N!==v&&this.options.updateMissing;if(E||A||D){if(this.logger.log(D?"updateKey":"missingKey",h,p,u,D?N:v),a){var I=this.resolve(u,U(U({},e),{},{keySeparator:!1}));I&&I.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 M=[],H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&H&&H[0])for(var F=0;F<H.length;F++)M.push(H[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(e.lng||this.language):M.push(e.lng||this.language);var V=function(t,n,r){var o=R&&r!==v?r:T;i.options.missingKeyHandler?i.options.missingKeyHandler(t,p,n,o,D,e):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(t,p,n,o,D,e),i.emit("missingKey",t,p,n,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?M.forEach(function(t){i.pluralResolver.getSuffixes(t,e).forEach(function(n){V([t],u+n,e["defaultValue".concat(n)]||N)})}):V(M,u,N))}v=this.extendTranslation(v,t,e,g,n),E&&v===u&&this.options.appendNamespaceToMissingKey&&(v="".concat(p,":").concat(u)),(E||A)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(u):u,A?v:void 0):this.options.parseMissingKeyHandler(v))}return s?(g.res=v,g):v}},{key:"extendTranslation",value:function(t,e,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(U(U({},n),{interpolation:U(U({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=t.match(this.interpolator.nestingRegexp);s=l&&l.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=U(U({},this.options.interpolation.defaultVariables),u)),t=this.interpolator.interpolate(t,u,n.lng||this.language,n),a){var c=t.match(this.interpolator.nestingRegexp);s<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=Array(t),s=0;s<t;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):o.translate.apply(o,r.concat([e]))},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,h="string"==typeof p?[p]:p;return null!=t&&h&&h.length&&!1!==n.applyPostProcessor&&(t=N.handle(h,t,e,this.options&&this.options.postProcessPassResolved?U({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!s.isValidLookup(e)){var l=s.extractFromKey(t,a),u=l.key;n=u;var c=l.namespaces;s.options.fallbackNS&&(c=c.concat(s.options.fallbackNS));var p=void 0!==a.count&&"string"!=typeof a.count,h=p&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);c.forEach(function(t){s.isValidLookup(e)||(o=t,!D["".concat(d[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(D["".concat(d[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as 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!!!")),d.forEach(function(n){if(!s.isValidLookup(e)){i=n;var o,l=[u];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,u,n,t,a);else{p&&(c=s.pluralResolver.getSuffix(n,a.count,a));var c,d="".concat(s.options.pluralSeparator,"zero");if(p&&(l.push(u+c),h&&l.push(u+d)),f){var g="".concat(u).concat(s.options.contextSeparator).concat(a.context);l.push(g),p&&(l.push(g+c),h&&l.push(g+d))}}for(;o=l.pop();)s.isValidLookup(e)||(r=o,e=s.getResource(n,t,o,a))}}))})}}),{res:e,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(t){return void 0!==t&&!(!this.options.returnNull&&null===t)&&!(!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}],[{key:"hasDefaultValue",value:function(t){var e="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&void 0!==t[n])return!0;return!1}}]),o}(b);function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}var H=function(){function t(e){i(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=m.create("languageUtils")}return a(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return null;var e=t.split("-");return 2===e.length||(e.pop(),"x"===e[e.length-1].toLowerCase())?null:this.formatLanguageCode(e.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=M(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach(function(t){if(!e){var r=n.formatLanguageCode(t);(!n.options.supportedLngs||n.isSupportedCode(r))&&(e=r)}}),!e&&this.options.supportedLngs&&t.forEach(function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find(function(t){if(0===t.indexOf(r))return t})}}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isSupportedCode(t)?i.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),r.forEach(function(t){0>i.indexOf(t)&&o(n.formatLanguageCode(t))}),i}}]),t}(),F=[{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}],V={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(+(1!=t&&(t%10!=1||t%100==11)))},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:3*(t%100==3||t%100==4))},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},z=["v1","v2","v3"],B={zero:0,one:1,two:2,few:3,many:4,other:5},K=function(){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.languageUtils=e,this.options=r,this.logger=m.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&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=(n={},F.forEach(function(t){t.lngs.forEach(function(e){n[e]={numbers:t.nr,plurals:V[t.fc]}})}),n)}return a(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(function(t){return"".concat(e).concat(t)})}},{key:"getSuffixes",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(t,e){return B[t]-B[e]}).map(function(t){return"".concat(e.options.prepend).concat(t)}):r.numbers.map(function(r){return e.getSuffix(t,r,n)}):[]}},{key:"getSuffix",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(e)):this.getSuffixRetroCompatible(r,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){var n=this,r=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),i=t.numbers[r];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!z.includes(this.options.compatibilityJSON)}}]),t}();function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var W=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.logger=m.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return a(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:j,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?$(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?$(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?$(e.nestingPrefix):e.nestingPrefixEscaped||$("$t("),this.nestingSuffix=e.nestingSuffix?$(e.nestingSuffix):e.nestingSuffixEscaped||$(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(0>t.indexOf(a.formatSeparator)){var i=P(e,l,t);return a.alwaysFormat?a.format(i,void 0,n,q(q(q({},r),e),{},{interpolationkey:t})):i}var o=t.split(a.formatSeparator),s=o.shift().trim(),u=o.join(a.formatSeparator).trim();return a.format(P(e,l,s),u,n,q(q(q({},r),e),{},{interpolationkey:s}))};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return u(t)}},{regex:this.regexp,safeValue:function(t){return a.escapeValue?u(a.escape(t)):u(t)}}].forEach(function(e){for(s=0;i=e.regex.exec(t);){var n=i[1].trim();if(void 0===(o=c(n)))if("function"==typeof p){var l=p(t,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else if(h){o=i[0];continue}else a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(t)),o="";else"string"==typeof o||a.useRawValueToEscape||(o=k(o));var u=e.safeValue(o);if(t=t.replace(i[0],u),h?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=i[0].length):e.regex.lastIndex=0,++s>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,e){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=q({},o);function a(t,e){var n=this.nestingOptionsSeparator;if(0>t.indexOf(n))return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);t=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),e&&(s=q(q({},e),s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(n).concat(i)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(t){return t.trim()});n[1]=c.shift(),l=c,u=!0}if((r=e(a.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=k(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),u&&(r=l.reduce(function(t,e){return i.format(t,e,o.lng,q(q({},o),{},{interpolationkey:n[1].trim()}))},r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function G(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Y(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Z(t){var e={};return function(n,r,i){var o=r+JSON.stringify(i),s=e[o];return s||(s=t(r,i),e[o]=s),s(n)}}var Q=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.logger=m.create("formatter"),this.options=e,this.formats={number:Z(function(t,e){var n=new Intl.NumberFormat(t,e);return function(t){return n.format(t)}}),currency:Z(function(t,e){var n=new Intl.NumberFormat(t,G(G({},e),{},{style:"currency"}));return function(t){return n.format(t)}}),datetime:Z(function(t,e){var n=new Intl.DateTimeFormat(t,G({},e));return function(t){return n.format(t)}}),relativetime:Z(function(t,e){var n=new Intl.RelativeTimeFormat(t,G({},e));return function(t){return n.format(t,e.range||"day")}}),list:Z(function(t,e){var n=new Intl.ListFormat(t,G({},e));return function(t){return n.format(t)}})},this.init(e)}return a(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=e.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"addCached",value:function(t,e){this.formats[t.toLowerCase().trim()]=Z(e)}},{key:"format",value:function(t,e,n,r){var i=this;return e.split(this.formatSeparator).reduce(function(t,e){var o=function(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===e&&0>i.indexOf(":")?n.currency||(n.currency=i.trim()):"relativetime"===e&&0>i.indexOf(":")?n.range||(n.range=i.trim()):i.split(";").forEach(function(t){if(t){var e,r=function(t){if(Array.isArray(t))return t}(e=t.split(":"))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return d(t,void 0);var n=Object.prototype.toString.call(t).slice(8,-1);if("Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return d(t,void 0)}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],o=r.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[i.trim()]||(n[i.trim()]=o),"false"===o&&(n[i.trim()]=!1),"true"===o&&(n[i.trim()]=!0),isNaN(o)||(n[i.trim()]=parseInt(o,10))}})}return{formatName:e,formatOptions:n}}(e),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=t;try{var u=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},c=u.locale||u.lng||r.locale||r.lng||n;l=i.formats[s](t,c,G(G(G({},a),r),u))}catch(t){i.logger.warn(t)}return l}return i.logger.warn("there was no format function for ".concat(s)),t},t)}}]),t}();function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var te=function(t){c(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(r);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function r(t,e,o){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i(this,r),s=n.call(this),A&&b.call(l(s)),s.backend=t,s.store=e,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=m.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return a(r,[{key:"queueLoad",value:function(t,e,n,r){var i=this,o={},s={},a={},l={};return t.forEach(function(t){var r=!0;e.forEach(function(e){var a="".concat(t,"|").concat(e);!n.reload&&i.store.hasResourceBundle(t,e)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[e]&&(l[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),i=r[0],o=r[1];e&&this.emit("failedLoading",i,o,e),n&&this.store.addResourceBundle(i,o,n),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(n){var r,a,l,u,c;r=n.loaded,(u=(l=S(r,[i],Object)).obj)[c=l.k]=u[c]||[],a||u[c].push(o),void 0!==n.pending[t]&&(delete n.pending[t],n.pendingCount--),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(t){s[t]||(s[t]={});var e=n.loaded[t];e.length&&e.forEach(function(e){void 0===s[t][e]&&(s[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return t.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](t,e,function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var u=r.waitingReads.shift();r.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(a&&l&&i<r.maxRetries)return void setTimeout(function(){r.read.call(r,t,e,n,i+1,2*o,s)},o);s(a,l)})):s(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var o=this.queueLoad(t,e,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(t){n.loadOne(t)})}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,s){r&&e.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&e.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),e.loaded(t,r,s)})}},{key:"saveMissing",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))return void this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" 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!!!");null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,tt(tt({},o),{},{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),r}(b);function tn(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&0>t.supportedLngs.indexOf("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function tr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ti(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tr(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function to(){}var ts=function(t){c(o,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(o);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function o(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(i(this,o),e=n.call(this),A&&b.call(l(e)),e.options=tn(r),e.services={},e.logger=m,e.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(t=l(e))).forEach(function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))}),s&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,s),p(e,l(e));setTimeout(function(){e.init(r,s)},0)}return e}return a(o,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));var i={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(t){var e={};if("object"===r(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var n=t[3]||t[2];Object.keys(n).forEach(function(t){e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(t){return t?"function"==typeof t?new t:t:null}if(this.options=ti(ti(ti({},i),this.options),tn(e)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ti(ti({},i.interpolation),this.options.interpolation)),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){this.modules.logger?m.init(o(this.modules.logger),this.options):m.init(null,this.options),this.modules.formatter?s=this.modules.formatter:"undefined"!=typeof Intl&&(s=Q);var s,a=new H(this.options);this.store=new L(this.options.resources,this.options);var l=this.services;l.logger=m,l.resourceStore=this.store,l.languageUtils=a,l.pluralResolver=new K(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=o(s),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new W(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new te(o(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.languageDetector&&(l.languageDetector=o(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=o(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new I(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.external.forEach(function(e){e.init&&e.init(t)})}if(this.format=this.options.interpolation.format,n||(n=to),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}});var c=O(),p=function(){var e=function(e,r){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(r),n(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),c}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:to,r=n,i="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach(function(t){0>o.indexOf(t)&&o.push(t)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return s(t)}),this.options.preload&&this.options.preload.forEach(function(t){return s(t)}),this.services.backendConnector.load(o,this.options.ns,function(t){t||e.resolvedLanguage||!e.language||e.setResolvedLanguage(e.language),r(t)})}else r(null)}},{key:"reloadResources",value:function(t,e,n){var r=O();return t||(t=this.languages),e||(e=this.options.ns),n||(n=to),this.services.backendConnector.reload(t,e,function(t){r.resolve(),n(t)}),r}},{key:"use",value:function(t){if(!t)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&N.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(var e=0;e<this.languages.length;e++){var n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=O();this.emit("languageChanging",t);var i=function(t){n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.resolvedLanguage=void 0,n.setResolvedLanguage(t)},o=function(t,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),e&&e(t,function(){return n.t.apply(n,arguments)})},s=function(e){t||e||!n.services.languageDetector||(e=[]);var r="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);r&&(n.language||i(r),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,function(t){o(t,r)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e,n){var i=this,o=function t(e,o){if("object"!==r(o)){for(var s,a=arguments.length,l=Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];s=i.options.overloadTranslationOptionHandler([e,o].concat(l))}else s=ti({},o);s.lng=s.lng||t.lng,s.lngs=s.lngs||t.lngs,s.ns=s.ns||t.ns,s.keyPrefix=s.keyPrefix||n||t.keyPrefix;var c=i.options.keySeparator||".",p=s.keyPrefix?"".concat(s.keyPrefix).concat(c).concat(e):e;return i.t(p,s)};return"string"==typeof t?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?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 r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return -1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=O();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach(function(t){0>n.options.ns.indexOf(t)&&n.options.ns.push(t)}),this.loadResources(function(t){r.resolve(),e&&e(t)}),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=O();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],i=t.filter(function(t){return 0>r.indexOf(t)});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(t){n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){return(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),t)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:to,r=ti(ti(ti({},this.options),e),{isClone:!0}),i=new o(r);return(void 0!==e.debug||void 0!==e.prefix)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(function(e){i[e]=t[e]}),i.services=ti({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new I(i.services,i.options),i.translator.on("*",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];i.emit.apply(i,[t].concat(n))}),i.init(r,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(b);f(ts,"createInstance",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ts(t,e)});var ta=ts.createInstance();ta.createInstance=ts.createInstance,ta.createInstance,ta.init,ta.loadResources,ta.reloadResources,ta.use,ta.changeLanguage,ta.getFixedT,ta.t,ta.exists,ta.setDefaultNamespace,ta.hasLoadedNamespace,ta.loadNamespaces,ta.loadLanguages;let tl=ta,tu=globalThis,tc=tu.ShadowRoot&&(void 0===tu.ShadyCSS||tu.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tp=Symbol(),th=new WeakMap;class tf{constructor(t,e,n){if(this._$cssResult$=!0,n!==tp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(tc&&void 0===t){let n=void 0!==e&&1===e.length;n&&(t=th.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&th.set(e,t))}return t}toString(){return this.cssText}}let td=tc?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return(t=>new tf("string"==typeof t?t:t+"",void 0,tp))(e)})(t):t,{is:tg,defineProperty:tv,getOwnPropertyDescriptor:ty,getOwnPropertyNames:tm,getOwnPropertySymbols:tb,getPrototypeOf:tO}=Object,tk=globalThis,tS=tk.trustedTypes,tx=tS?tS.emptyScript:"",tw=tk.reactiveElementPolyfillSupport,tP={toAttribute(t,e){switch(e){case Boolean:t=t?tx:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},t$=(t,e)=>!tg(t,e),t_={attribute:!0,type:String,converter:tP,reflect:!1,useDefault:!1,hasChanged:t$};Symbol.metadata??=Symbol("metadata"),tk.litPropertyMetadata??=new WeakMap;class tj extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=t_){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&tv(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){let{get:r,set:i}=ty(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){let o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??t_}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=tO(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...tm(t),...tb(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,n]of e)this.elementProperties.set(t,n)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let n of new Set(t.flat(1/0).reverse()))e.unshift(td(n));else void 0!==t&&e.push(td(t));return e}static _$Eu(t,e){let n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(tc)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let n of e){let e=document.createElement("style"),r=tu.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){let i=(void 0!==n.converter?.toAttribute?n.converter:tP).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){let t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:tP;this._$Em=r;let o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){let r=this.constructor,i=this[t];if(!(((n??=r.getPropertyOptions(t)).hasChanged??t$)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,n]of t){let{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}tj.elementStyles=[],tj.shadowRootOptions={mode:"open"},tj.elementProperties=new Map,tj.finalized=new Map,tw?.({ReactiveElement:tj}),(tk.reactiveElementVersions??=[]).push("2.1.1");let tA=globalThis,tE=tA.trustedTypes,tC=tE?tE.createPolicy("lit-html",{createHTML:t=>t}):void 0,tR="$lit$",tL=`lit$${Math.random().toFixed(9).slice(2)}$`,tN="?"+tL,tT=`<${tN}>`,tU=document,tD=()=>tU.createComment(""),tI=t=>null===t||"object"!=typeof t&&"function"!=typeof t,tM=Array.isArray,tH="[ \n\f\r]",tF=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tV=/-->/g,tz=/>/g,tB=RegExp(`>|${tH}(?:([^\\s"'>=/]+)(${tH}*=${tH}*(?:[^
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ORTranslate=e():t.ORTranslate=e()}(self,()=>(()=>{"use strict";var t={};t.d=(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};t.r(e),t.d(e,{i18next:()=>tl,translate:()=>n,OrTranslate:()=>ea});let n=t=>e=>class extends e{constructor(){super(...arguments),this._i18nextJustInitialized=!1,this._language=t.language,this.initCallback=t=>{this._i18nextJustInitialized=!0,this.requestUpdate&&this.requestUpdate()},this.langChangedCallback=()=>{this.requestUpdate&&(this._language=t.language,this.requestUpdate("_language"))}}connectedCallback(){t.language||t.on("initialized",this.initCallback),t.on("languageChanged",this.langChangedCallback),super.connectedCallback&&super.connectedCallback()}disconnectedCallback(){t.off("initialized",this.initCallback),t.off("languageChanged",this.langChangedCallback),super.disconnectedCallback&&super.disconnectedCallback()}shouldUpdate(t){return this._i18nextJustInitialized?(this._i18nextJustInitialized=!1,!0):super.shouldUpdate&&super.shouldUpdate(t)}};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function i(t,e){if(!(t instanceof e))throw TypeError("Cannot call a class as a function")}function o(t){var e=function(t,e){if("object"!=r(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=r(i))return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==r(e)?e:e+""}function s(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,o(r.key),r)}}function a(t,e,n){return e&&s(t.prototype,e),n&&s(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){if(void 0===t)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t,e){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function c(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}function p(t,e){if(e&&("object"==r(e)||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return l(t)}function h(t){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e,n){return(e=o(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function g(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function v(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?g(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var y={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,e){console&&console[t]&&console[t].apply(console,e)}},m=new(function(){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.init(e,n)}return a(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=e.prefix||"i18next:",this.logger=t||y,this.options=e,this.debug=e.debug}},{key:"setDebug",value:function(t){this.debug=t}},{key:"log",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"log","",!0)}},{key:"warn",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","",!0)}},{key:"error",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"error","")}},{key:"deprecate",value:function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(t,e,n,r){return r&&!this.debug?null:("string"==typeof t[0]&&(t[0]="".concat(n).concat(this.prefix," ").concat(t[0])),this.logger[e](t))}},{key:"create",value:function(e){return new t(this.logger,v(v({},{prefix:"".concat(this.prefix,":").concat(e,":")}),this.options))}},{key:"clone",value:function(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new t(this.logger,e)}}]),t}()),b=function(){function t(){i(this,t),this.observers={}}return a(t,[{key:"on",value:function(t,e){var n=this;return t.split(" ").forEach(function(t){n.observers[t]=n.observers[t]||[],n.observers[t].push(e)}),this}},{key:"off",value:function(t,e){if(this.observers[t]){if(!e)return void delete this.observers[t];this.observers[t]=this.observers[t].filter(function(t){return t!==e})}}},{key:"emit",value:function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];this.observers[t]&&[].concat(this.observers[t]).forEach(function(t){t.apply(void 0,n)}),this.observers["*"]&&[].concat(this.observers["*"]).forEach(function(e){e.apply(e,[t].concat(n))})}}]),t}();function O(){var t,e,n=new Promise(function(n,r){t=n,e=r});return n.resolve=t,n.reject=e,n}function k(t){return null==t?"":""+t}function S(t,e,n){function r(t){return t&&t.indexOf("###")>-1?t.replace(/###/g,"."):t}function i(){return!t||"string"==typeof t}for(var o="string"!=typeof e?[].concat(e):e.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!t[s]&&n&&(t[s]=new n),t=Object.prototype.hasOwnProperty.call(t,s)?t[s]:{}}return i()?{}:{obj:t,k:r(o.shift())}}function x(t,e,n){var r=S(t,e,Object);r.obj[r.k]=n}function w(t,e){var n=S(t,e),r=n.obj,i=n.k;if(r)return r[i]}function P(t,e,n){var r=w(t,n);return void 0!==r?r:w(e,n)}function $(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var _={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function j(t){return"string"==typeof t?t.replace(/[&<>"'\/]/g,function(t){return _[t]}):t}var A="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,E=[" ",",","?","!",";"];function C(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function R(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?C(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var L=function(t){c(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(r);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function r(t){var e,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return i(this,r),e=n.call(this),A&&b.call(l(e)),e.data=t||{},e.options=o,void 0===e.options.keySeparator&&(e.options.keySeparator="."),void 0===e.options.ignoreJSONStructure&&(e.options.ignoreJSONStructure=!0),e}return a(r,[{key:"addNamespaces",value:function(t){0>this.options.ns.indexOf(t)&&this.options.ns.push(t)}},{key:"removeNamespaces",value:function(t){var e=this.options.ns.indexOf(t);e>-1&&this.options.ns.splice(e,1)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[t,e];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),t.indexOf(".")>-1&&(s=t.split("."));var a=w(this.data,s);return a||!o||"string"!=typeof n?a:function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[n])return e[n];for(var i=n.split(r),o=e,s=0;s<i.length;++s){if(!o||"string"==typeof o[i[s]]&&s+1<i.length)return;if(void 0===o[i[s]]){for(var a=2,l=i.slice(s,s+a).join(r),u=o[l];void 0===u&&i.length>s+a;)a++,u=o[l=i.slice(s,s+a).join(r)];if(void 0===u)return;if(null===u)return null;if(n.endsWith(l)){if("string"==typeof u)return u;if(l&&"string"==typeof u[l])return u[l]}var c=i.slice(s+a).join(r);if(c)return t(u,c,r);return}o=o[i[s]]}return o}}(this.data&&this.data[t]&&this.data[t][e],n,i)}},{key:"addResource",value:function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[t,e];n&&(s=s.concat(o?n.split(o):n)),t.indexOf(".")>-1&&(s=t.split("."),r=e,e=s[1]),this.addNamespaces(e),x(this.data,s,r),i.silent||this.emit("added",t,e,n,r)}},{key:"addResources",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)("string"==typeof n[i]||"[object Array]"===Object.prototype.toString.apply(n[i]))&&this.addResource(t,e,i,n[i],{silent:!0});r.silent||this.emit("added",t,e,n)}},{key:"addResourceBundle",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[t,e];t.indexOf(".")>-1&&(s=t.split("."),r=n,n=e,e=s[1]),this.addNamespaces(e);var a=w(this.data,s)||{};r?function t(e,n,r){for(var i in n)"__proto__"!==i&&"constructor"!==i&&(i in e?"string"==typeof e[i]||e[i]instanceof String||"string"==typeof n[i]||n[i]instanceof String?r&&(e[i]=n[i]):t(e[i],n[i],r):e[i]=n[i]);return e}(a,n,i):a=R(R({},a),n),x(this.data,s,a),o.silent||this.emit("added",t,e,n)}},{key:"removeResourceBundle",value:function(t,e){this.hasResourceBundle(t,e)&&delete this.data[t][e],this.removeNamespaces(e),this.emit("removed",t,e)}},{key:"hasResourceBundle",value:function(t,e){return void 0!==this.getResource(t,e)}},{key:"getResourceBundle",value:function(t,e){return(e||(e=this.options.defaultNS),"v1"===this.options.compatibilityAPI)?R(R({},{}),this.getResource(t,e)):this.getResource(t,e)}},{key:"getDataByLanguage",value:function(t){return this.data[t]}},{key:"hasLanguageSomeTranslations",value:function(t){var e=this.getDataByLanguage(t);return!!(e&&Object.keys(e)||[]).find(function(t){return e[t]&&Object.keys(e[t]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),r}(b),N={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,e,n,r,i){var o=this;return t.forEach(function(t){o.processors[t]&&(e=o.processors[t].process(e,n,r,i))}),e}};function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function U(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?T(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):T(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var D={},I=function(t){c(o,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(o);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function o(t){var e,r,s,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return i(this,o),s=n.call(this),A&&b.call(l(s)),e=["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r=l(s),e.forEach(function(e){t[e]&&(r[e]=t[e])}),s.options=a,void 0===s.options.keySeparator&&(s.options.keySeparator="."),s.logger=m.create("translator"),s}return a(o,[{key:"changeLanguage",value:function(t){t&&(this.language=t)}},{key:"exists",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==t)return!1;var n=this.resolve(t,e);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(t,e){var n=void 0!==e.nsSeparator?e.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,i=e.ns||this.options.defaultNS||[],o=n&&t.indexOf(n)>-1,s=!this.options.userDefinedKeySeparator&&!e.keySeparator&&!this.options.userDefinedNsSeparator&&!e.nsSeparator&&!function(t,e,n){e=e||"",n=n||"";var r=E.filter(function(t){return 0>e.indexOf(t)&&0>n.indexOf(t)});if(0===r.length)return!0;var i=new RegExp("(".concat(r.map(function(t){return"?"===t?"\\?":t}).join("|"),")")),o=!i.test(t);if(!o){var s=t.indexOf(n);s>0&&!i.test(t.substring(0,s))&&(o=!0)}return o}(t,n,r);if(o&&!s){var a=t.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:t,namespaces:i};var l=t.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),t=l.join(r)}return"string"==typeof i&&(i=[i]),{key:t,namespaces:i}}},{key:"translate",value:function(t,e,n){var i=this;if("object"!==r(e)&&this.options.overloadTranslationOptionHandler&&(e=this.options.overloadTranslationOptionHandler(arguments)),e||(e={}),null==t)return"";Array.isArray(t)||(t=[String(t)]);var s=void 0!==e.returnDetails?e.returnDetails:this.options.returnDetails,a=void 0!==e.keySeparator?e.keySeparator:this.options.keySeparator,l=this.extractFromKey(t[t.length-1],e),u=l.key,c=l.namespaces,p=c[c.length-1],h=e.lng||this.language,f=e.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&"cimode"===h.toLowerCase()){if(f){var d=e.nsSeparator||this.options.nsSeparator;return s?(g.res="".concat(p).concat(d).concat(u),g):"".concat(p).concat(d).concat(u)}return s?(g.res=u,g):u}var g=this.resolve(t,e),v=g&&g.res,y=g&&g.usedKey||u,m=g&&g.exactUsedKey||u,b=Object.prototype.toString.apply(v),O=void 0!==e.joinArrays?e.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,S="string"!=typeof v&&"boolean"!=typeof v&&"number"!=typeof v;if(k&&v&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(b)&&("string"!=typeof O||"[object Array]"!==b)){if(!e.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var x=this.options.returnedObjectHandler?this.options.returnedObjectHandler(y,v,U(U({},e),{},{ns:c})):"key '".concat(u," (").concat(this.language,")' returned an object instead of string.");return s?(g.res=x,g):x}if(a){var w="[object Array]"===b,P=w?[]:{},$=w?m:y;for(var _ in v)if(Object.prototype.hasOwnProperty.call(v,_)){var j="".concat($).concat(a).concat(_);P[_]=this.translate(j,U(U({},e),{joinArrays:!1,ns:c})),P[_]===j&&(P[_]=v[_])}v=P}}else if(k&&"string"==typeof O&&"[object Array]"===b)(v=v.join(O))&&(v=this.extendTranslation(v,t,e,n));else{var A=!1,E=!1,C=void 0!==e.count&&"string"!=typeof e.count,R=o.hasDefaultValue(e),L=C?this.pluralResolver.getSuffix(h,e.count,e):"",N=e["defaultValue".concat(L)]||e.defaultValue;!this.isValidLookup(v)&&R&&(A=!0,v=N),this.isValidLookup(v)||(E=!0,v=u);var T=(e.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&E?void 0:v,D=R&&N!==v&&this.options.updateMissing;if(E||A||D){if(this.logger.log(D?"updateKey":"missingKey",h,p,u,D?N:v),a){var I=this.resolve(u,U(U({},e),{},{keySeparator:!1}));I&&I.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 M=[],H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,e.lng||this.language);if("fallback"===this.options.saveMissingTo&&H&&H[0])for(var F=0;F<H.length;F++)M.push(H[F]);else"all"===this.options.saveMissingTo?M=this.languageUtils.toResolveHierarchy(e.lng||this.language):M.push(e.lng||this.language);var V=function(t,n,r){var o=R&&r!==v?r:T;i.options.missingKeyHandler?i.options.missingKeyHandler(t,p,n,o,D,e):i.backendConnector&&i.backendConnector.saveMissing&&i.backendConnector.saveMissing(t,p,n,o,D,e),i.emit("missingKey",t,p,n,v)};this.options.saveMissing&&(this.options.saveMissingPlurals&&C?M.forEach(function(t){i.pluralResolver.getSuffixes(t,e).forEach(function(n){V([t],u+n,e["defaultValue".concat(n)]||N)})}):V(M,u,N))}v=this.extendTranslation(v,t,e,g,n),E&&v===u&&this.options.appendNamespaceToMissingKey&&(v="".concat(p,":").concat(u)),(E||A)&&this.options.parseMissingKeyHandler&&(v="v1"!==this.options.compatibilityAPI?this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(u):u,A?v:void 0):this.options.parseMissingKeyHandler(v))}return s?(g.res=v,g):v}},{key:"extendTranslation",value:function(t,e,n,r,i){var o=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,U(U({},this.options.interpolation.defaultVariables),n),r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init(U(U({},n),{interpolation:U(U({},this.options.interpolation),n.interpolation)}));var s,a="string"==typeof t&&(n&&n.interpolation&&void 0!==n.interpolation.skipOnVariables?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(a){var l=t.match(this.interpolator.nestingRegexp);s=l&&l.length}var u=n.replace&&"string"!=typeof n.replace?n.replace:n;if(this.options.interpolation.defaultVariables&&(u=U(U({},this.options.interpolation.defaultVariables),u)),t=this.interpolator.interpolate(t,u,n.lng||this.language,n),a){var c=t.match(this.interpolator.nestingRegexp);s<(c&&c.length)&&(n.nest=!1)}!1!==n.nest&&(t=this.interpolator.nest(t,function(){for(var t=arguments.length,r=Array(t),s=0;s<t;s++)r[s]=arguments[s];return i&&i[0]===r[0]&&!n.context?(o.logger.warn("It seems you are nesting recursively key: ".concat(r[0]," in key: ").concat(e[0])),null):o.translate.apply(o,r.concat([e]))},n)),n.interpolation&&this.interpolator.reset()}var p=n.postProcess||this.options.postProcess,h="string"==typeof p?[p]:p;return null!=t&&h&&h.length&&!1!==n.applyPostProcessor&&(t=N.handle(h,t,e,this.options&&this.options.postProcessPassResolved?U({i18nResolved:r},n):n,this)),t}},{key:"resolve",value:function(t){var e,n,r,i,o,s=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof t&&(t=[t]),t.forEach(function(t){if(!s.isValidLookup(e)){var l=s.extractFromKey(t,a),u=l.key;n=u;var c=l.namespaces;s.options.fallbackNS&&(c=c.concat(s.options.fallbackNS));var p=void 0!==a.count&&"string"!=typeof a.count,h=p&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),f=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,d=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);c.forEach(function(t){s.isValidLookup(e)||(o=t,!D["".concat(d[0],"-").concat(t)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(D["".concat(d[0],"-").concat(t)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(d.join(", "),'" won\'t get resolved as 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!!!")),d.forEach(function(n){if(!s.isValidLookup(e)){i=n;var o,l=[u];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,u,n,t,a);else{p&&(c=s.pluralResolver.getSuffix(n,a.count,a));var c,d="".concat(s.options.pluralSeparator,"zero");if(p&&(l.push(u+c),h&&l.push(u+d)),f){var g="".concat(u).concat(s.options.contextSeparator).concat(a.context);l.push(g),p&&(l.push(g+c),h&&l.push(g+d))}}for(;o=l.pop();)s.isValidLookup(e)||(r=o,e=s.getResource(n,t,o,a))}}))})}}),{res:e,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(t){return void 0!==t&&!(!this.options.returnNull&&null===t)&&!(!this.options.returnEmptyString&&""===t)}},{key:"getResource",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,e,n,r):this.resourceStore.getResource(t,e,n,r)}}],[{key:"hasDefaultValue",value:function(t){var e="defaultValue";for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e===n.substring(0,e.length)&&void 0!==t[n])return!0;return!1}}]),o}(b);function M(t){return t.charAt(0).toUpperCase()+t.slice(1)}var H=function(){function t(e){i(this,t),this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=m.create("languageUtils")}return a(t,[{key:"getScriptPartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return null;var e=t.split("-");return 2===e.length||(e.pop(),"x"===e[e.length-1].toLowerCase())?null:this.formatLanguageCode(e.join("-"))}},{key:"getLanguagePartFromCode",value:function(t){if(!t||0>t.indexOf("-"))return t;var e=t.split("-");return this.formatLanguageCode(e[0])}},{key:"formatLanguageCode",value:function(t){if("string"==typeof t&&t.indexOf("-")>-1){var e=["hans","hant","latn","cyrl","cans","mong","arab"],n=t.split("-");return this.options.lowerCaseLng?n=n.map(function(t){return t.toLowerCase()}):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),e.indexOf(n[1].toLowerCase())>-1&&(n[1]=M(n[1].toLowerCase())),e.indexOf(n[2].toLowerCase())>-1&&(n[2]=M(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}},{key:"isSupportedCode",value:function(t){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}},{key:"getBestMatchFromCodes",value:function(t){var e,n=this;return t?(t.forEach(function(t){if(!e){var r=n.formatLanguageCode(t);(!n.options.supportedLngs||n.isSupportedCode(r))&&(e=r)}}),!e&&this.options.supportedLngs&&t.forEach(function(t){if(!e){var r=n.getLanguagePartFromCode(t);if(n.isSupportedCode(r))return e=r;e=n.options.supportedLngs.find(function(t){if(0===t.indexOf(r))return t})}}),e||(e=this.getFallbackCodes(this.options.fallbackLng)[0]),e):null}},{key:"getFallbackCodes",value:function(t,e){if(!t)return[];if("function"==typeof t&&(t=t(e)),"string"==typeof t&&(t=[t]),"[object Array]"===Object.prototype.toString.apply(t))return t;if(!e)return t.default||[];var n=t[e];return n||(n=t[this.getScriptPartFromCode(e)]),n||(n=t[this.formatLanguageCode(e)]),n||(n=t[this.getLanguagePartFromCode(e)]),n||(n=t.default),n||[]}},{key:"toResolveHierarchy",value:function(t,e){var n=this,r=this.getFallbackCodes(e||this.options.fallbackLng||[],t),i=[],o=function(t){t&&(n.isSupportedCode(t)?i.push(t):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(t)))};return"string"==typeof t&&t.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(t)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(t)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(t))):"string"==typeof t&&o(this.formatLanguageCode(t)),r.forEach(function(t){0>i.indexOf(t)&&o(n.formatLanguageCode(t))}),i}}]),t}(),F=[{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}],V={1:function(t){return Number(t>1)},2:function(t){return Number(1!=t)},3:function(t){return 0},4:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},5:function(t){return Number(0==t?0:1==t?1:2==t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5)},6:function(t){return Number(1==t?0:t>=2&&t<=4?1:2)},7:function(t){return Number(1==t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2)},8:function(t){return Number(1==t?0:2==t?1:8!=t&&11!=t?2:3)},9:function(t){return Number(t>=2)},10:function(t){return Number(1==t?0:2==t?1:t<7?2:t<11?3:4)},11:function(t){return Number(1==t||11==t?0:2==t||12==t?1:t>2&&t<20?2:3)},12:function(t){return Number(t%10!=1||t%100==11)},13:function(t){return Number(0!==t)},14:function(t){return Number(1==t?0:2==t?1:3==t?2:3)},15:function(t){return Number(t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2)},16:function(t){return Number(t%10==1&&t%100!=11?0:0!==t?1:2)},17:function(t){return Number(+(1!=t&&(t%10!=1||t%100==11)))},18:function(t){return Number(0==t?0:1==t?1:2)},19:function(t){return Number(1==t?0:0==t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3)},20:function(t){return Number(1==t?0:0==t||t%100>0&&t%100<20?1:2)},21:function(t){return Number(t%100==1?1:t%100==2?2:3*(t%100==3||t%100==4))},22:function(t){return Number(1==t?0:2==t?1:(t<0||t>10)&&t%10==0?2:3)}},z=["v1","v2","v3"],B={zero:0,one:1,two:2,few:3,many:4,other:5},K=function(){function t(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};i(this,t),this.languageUtils=e,this.options=r,this.logger=m.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&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=(n={},F.forEach(function(t){t.lngs.forEach(function(e){n[e]={numbers:t.nr,plurals:V[t.fc]}})}),n)}return a(t,[{key:"addRule",value:function(t,e){this.rules[t]=e}},{key:"getRule",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(t,{type:e.ordinal?"ordinal":"cardinal"})}catch(t){return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}},{key:"needsPlural",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(t,e);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(t,n).map(function(t){return"".concat(e).concat(t)})}},{key:"getSuffixes",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort(function(t,e){return B[t]-B[e]}).map(function(t){return"".concat(e.options.prepend).concat(t)}):r.numbers.map(function(r){return e.getSuffix(t,r,n)}):[]}},{key:"getSuffix",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(t,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(e)):this.getSuffixRetroCompatible(r,e):(this.logger.warn("no plural rule found for: ".concat(t)),"")}},{key:"getSuffixRetroCompatible",value:function(t,e){var n=this,r=t.noAbs?t.plurals(e):t.plurals(Math.abs(e)),i=t.numbers[r];this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===t.numbers.length&&1===t.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!z.includes(this.options.compatibilityJSON)}}]),t}();function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function q(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var W=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.logger=m.create("interpolator"),this.options=e,this.format=e.interpolation&&e.interpolation.format||function(t){return t},this.init(e)}return a(t,[{key:"init",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});var e=t.interpolation;this.escape=void 0!==e.escape?e.escape:j,this.escapeValue=void 0===e.escapeValue||e.escapeValue,this.useRawValueToEscape=void 0!==e.useRawValueToEscape&&e.useRawValueToEscape,this.prefix=e.prefix?$(e.prefix):e.prefixEscaped||"{{",this.suffix=e.suffix?$(e.suffix):e.suffixEscaped||"}}",this.formatSeparator=e.formatSeparator?e.formatSeparator:e.formatSeparator||",",this.unescapePrefix=e.unescapeSuffix?"":e.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":e.unescapeSuffix||"",this.nestingPrefix=e.nestingPrefix?$(e.nestingPrefix):e.nestingPrefixEscaped||$("$t("),this.nestingSuffix=e.nestingSuffix?$(e.nestingSuffix):e.nestingSuffixEscaped||$(")"),this.nestingOptionsSeparator=e.nestingOptionsSeparator?e.nestingOptionsSeparator:e.nestingOptionsSeparator||",",this.maxReplaces=e.maxReplaces?e.maxReplaces:1e3,this.alwaysFormat=void 0!==e.alwaysFormat&&e.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var t="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=RegExp(t,"g");var e="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=RegExp(e,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=RegExp(n,"g")}},{key:"interpolate",value:function(t,e,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function u(t){return t.replace(/\$/g,"$$$$")}var c=function(t){if(0>t.indexOf(a.formatSeparator)){var i=P(e,l,t);return a.alwaysFormat?a.format(i,void 0,n,q(q(q({},r),e),{},{interpolationkey:t})):i}var o=t.split(a.formatSeparator),s=o.shift().trim(),u=o.join(a.formatSeparator).trim();return a.format(P(e,l,s),u,n,q(q(q({},r),e),{},{interpolationkey:s}))};this.resetRegExp();var p=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(t){return u(t)}},{regex:this.regexp,safeValue:function(t){return a.escapeValue?u(a.escape(t)):u(t)}}].forEach(function(e){for(s=0;i=e.regex.exec(t);){var n=i[1].trim();if(void 0===(o=c(n)))if("function"==typeof p){var l=p(t,i,r);o="string"==typeof l?l:""}else if(r&&r.hasOwnProperty(n))o="";else if(h){o=i[0];continue}else a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(t)),o="";else"string"==typeof o||a.useRawValueToEscape||(o=k(o));var u=e.safeValue(o);if(t=t.replace(i[0],u),h?(e.regex.lastIndex+=o.length,e.regex.lastIndex-=i[0].length):e.regex.lastIndex=0,++s>=a.maxReplaces)break}}),t}},{key:"nest",value:function(t,e){var n,r,i=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=q({},o);function a(t,e){var n=this.nestingOptionsSeparator;if(0>t.indexOf(n))return t;var r=t.split(new RegExp("".concat(n,"[ ]*{"))),i="{".concat(r[1]);t=r[0];var o=(i=this.interpolate(i,s)).match(/'/g),a=i.match(/"/g);(o&&o.length%2==0&&!a||a.length%2!=0)&&(i=i.replace(/'/g,'"'));try{s=JSON.parse(i),e&&(s=q(q({},e),s))}catch(e){return this.logger.warn("failed parsing options string in nesting for key ".concat(t),e),"".concat(t).concat(n).concat(i)}return delete s.defaultValue,t}for(s.applyPostProcessor=!1,delete s.defaultValue;n=this.nestingRegexp.exec(t);){var l=[],u=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var c=n[1].split(this.formatSeparator).map(function(t){return t.trim()});n[1]=c.shift(),l=c,u=!0}if((r=e(a.call(this,n[1].trim(),s),s))&&n[0]===t&&"string"!=typeof r)return r;"string"!=typeof r&&(r=k(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(t)),r=""),u&&(r=l.reduce(function(t,e){return i.format(t,e,o.lng,q(q({},o),{},{interpolationkey:n[1].trim()}))},r.trim())),t=t.replace(n[0],r),this.regexp.lastIndex=0}return t}}]),t}();function Y(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function G(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Y(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function Z(t){var e={};return function(n,r,i){var o=r+JSON.stringify(i),s=e[o];return s||(s=t(r,i),e[o]=s),s(n)}}var Q=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,t),this.logger=m.create("formatter"),this.options=e,this.formats={number:Z(function(t,e){var n=new Intl.NumberFormat(t,e);return function(t){return n.format(t)}}),currency:Z(function(t,e){var n=new Intl.NumberFormat(t,G(G({},e),{},{style:"currency"}));return function(t){return n.format(t)}}),datetime:Z(function(t,e){var n=new Intl.DateTimeFormat(t,G({},e));return function(t){return n.format(t)}}),relativetime:Z(function(t,e){var n=new Intl.RelativeTimeFormat(t,G({},e));return function(t){return n.format(t,e.range||"day")}}),list:Z(function(t,e){var n=new Intl.ListFormat(t,G({},e));return function(t){return n.format(t)}})},this.init(e)}return a(t,[{key:"init",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=e.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(t,e){this.formats[t.toLowerCase().trim()]=e}},{key:"addCached",value:function(t,e){this.formats[t.toLowerCase().trim()]=Z(e)}},{key:"format",value:function(t,e,n,r){var i=this;return e.split(this.formatSeparator).reduce(function(t,e){var o=function(t){var e=t.toLowerCase().trim(),n={};if(t.indexOf("(")>-1){var r=t.split("(");e=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);"currency"===e&&0>i.indexOf(":")?n.currency||(n.currency=i.trim()):"relativetime"===e&&0>i.indexOf(":")?n.range||(n.range=i.trim()):i.split(";").forEach(function(t){if(t){var e,r=function(t){if(Array.isArray(t))return t}(e=t.split(":"))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(e)||function(t,e){if(t){if("string"==typeof t)return d(t,void 0);var n=({}).toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),i=r[0],o=r.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[i.trim()]||(n[i.trim()]=o),"false"===o&&(n[i.trim()]=!1),"true"===o&&(n[i.trim()]=!0),isNaN(o)||(n[i.trim()]=parseInt(o,10))}})}return{formatName:e,formatOptions:n}}(e),s=o.formatName,a=o.formatOptions;if(i.formats[s]){var l=t;try{var u=r&&r.formatParams&&r.formatParams[r.interpolationkey]||{},c=u.locale||u.lng||r.locale||r.lng||n;l=i.formats[s](t,c,G(G(G({},a),r),u))}catch(t){i.logger.warn(t)}return l}return i.logger.warn("there was no format function for ".concat(s)),t},t)}}]),t}();function X(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function tt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?X(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var te=function(t){c(r,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(r);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function r(t,e,o){var s,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return i(this,r),s=n.call(this),A&&b.call(l(s)),s.backend=t,s.store=e,s.services=o,s.languageUtils=o.languageUtils,s.options=a,s.logger=m.create("backendConnector"),s.waitingReads=[],s.maxParallelReads=a.maxParallelReads||10,s.readingCalls=0,s.maxRetries=a.maxRetries>=0?a.maxRetries:5,s.retryTimeout=a.retryTimeout>=1?a.retryTimeout:350,s.state={},s.queue=[],s.backend&&s.backend.init&&s.backend.init(o,a.backend,a),s}return a(r,[{key:"queueLoad",value:function(t,e,n,r){var i=this,o={},s={},a={},l={};return t.forEach(function(t){var r=!0;e.forEach(function(e){var a="".concat(t,"|").concat(e);!n.reload&&i.store.hasResourceBundle(t,e)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[e]&&(l[e]=!0)))}),r||(a[t]=!0)}),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(t,e,n){var r=t.split("|"),i=r[0],o=r[1];e&&this.emit("failedLoading",i,o,e),n&&this.store.addResourceBundle(i,o,n),this.state[t]=e?-1:2;var s={};this.queue.forEach(function(n){var r,a,l,u,c;r=n.loaded,(u=(l=S(r,[i],Object)).obj)[c=l.k]=u[c]||[],a||u[c].push(o),void 0!==n.pending[t]&&(delete n.pending[t],n.pendingCount--),e&&n.errors.push(e),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(function(t){s[t]||(s[t]={});var e=n.loaded[t];e.length&&e.forEach(function(e){void 0===s[t][e]&&(s[t][e]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(function(t){return!t.done})}},{key:"read",value:function(t,e,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;return t.length?this.readingCalls>=this.maxParallelReads?void this.waitingReads.push({lng:t,ns:e,fcName:n,tried:i,wait:o,callback:s}):(this.readingCalls++,this.backend[n](t,e,function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var u=r.waitingReads.shift();r.read(u.lng,u.ns,u.fcName,u.tried,u.wait,u.callback)}if(a&&l&&i<r.maxRetries)return void setTimeout(function(){r.read.call(r,t,e,n,i+1,2*o,s)},o);s(a,l)})):s(null,{})}},{key:"prepareLoading",value:function(t,e){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof t&&(t=this.languageUtils.toResolveHierarchy(t)),"string"==typeof e&&(e=[e]);var o=this.queueLoad(t,e,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach(function(t){n.loadOne(t)})}},{key:"load",value:function(t,e,n){this.prepareLoading(t,e,{},n)}},{key:"reload",value:function(t,e,n){this.prepareLoading(t,e,{reload:!0},n)}},{key:"loadOne",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=t.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,function(r,s){r&&e.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&e.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),e.loaded(t,r,s)})}},{key:"saveMissing",value:function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(e))return void this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(e,'" 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!!!");null!=n&&""!==n&&(this.backend&&this.backend.create&&this.backend.create(t,e,n,r,null,tt(tt({},o),{},{isUpdate:i})),t&&t[0]&&this.store.addResource(t[0],e,n,r))}}]),r}(b);function tn(t){return"string"==typeof t.ns&&(t.ns=[t.ns]),"string"==typeof t.fallbackLng&&(t.fallbackLng=[t.fallbackLng]),"string"==typeof t.fallbackNS&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&0>t.supportedLngs.indexOf("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t}function tr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function ti(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tr(Object(n),!0).forEach(function(e){f(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function to(){}var ts=function(t){c(o,t);var e,n=(e=function(){if("undefined"==typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=h(o);return t=e?Reflect.construct(n,arguments,h(this).constructor):n.apply(this,arguments),p(this,t)});function o(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(i(this,o),e=n.call(this),A&&b.call(l(e)),e.options=tn(r),e.services={},e.logger=m,e.modules={external:[]},Object.getOwnPropertyNames(Object.getPrototypeOf(t=l(e))).forEach(function(e){"function"==typeof t[e]&&(t[e]=t[e].bind(t))}),s&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,s),p(e,l(e));setTimeout(function(){e.init(r,s)},0)}return e}return a(o,[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof e&&(n=e,e={}),!e.defaultNS&&!1!==e.defaultNS&&e.ns&&("string"==typeof e.ns?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));var i={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(t){var e={};if("object"===r(t[1])&&(e=t[1]),"string"==typeof t[1]&&(e.defaultValue=t[1]),"string"==typeof t[2]&&(e.tDescription=t[2]),"object"===r(t[2])||"object"===r(t[3])){var n=t[3]||t[2];Object.keys(n).forEach(function(t){e[t]=n[t]})}return e},interpolation:{escapeValue:!0,format:function(t,e,n,r){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}};function o(t){return t?"function"==typeof t?new t:t:null}if(this.options=ti(ti(ti({},i),this.options),tn(e)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ti(ti({},i.interpolation),this.options.interpolation)),void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator),!this.options.isClone){this.modules.logger?m.init(o(this.modules.logger),this.options):m.init(null,this.options),this.modules.formatter?s=this.modules.formatter:"undefined"!=typeof Intl&&(s=Q);var s,a=new H(this.options);this.store=new L(this.options.resources,this.options);var l=this.services;l.logger=m,l.resourceStore=this.store,l.languageUtils=a,l.pluralResolver=new K(a,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),s&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(l.formatter=o(s),l.formatter.init(l,this.options),this.options.interpolation.format=l.formatter.format.bind(l.formatter)),l.interpolator=new W(this.options),l.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},l.backendConnector=new te(o(this.modules.backend),l.resourceStore,l,this.options),l.backendConnector.on("*",function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.languageDetector&&(l.languageDetector=o(this.modules.languageDetector),l.languageDetector.init(l,this.options.detection,this.options)),this.modules.i18nFormat&&(l.i18nFormat=o(this.modules.i18nFormat),l.i18nFormat.init&&l.i18nFormat.init(this)),this.translator=new I(this.services,this.options),this.translator.on("*",function(e){for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];t.emit.apply(t,[e].concat(r))}),this.modules.external.forEach(function(e){e.init&&e.init(t)})}if(this.format=this.options.interpolation.format,n||(n=to),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&"dev"!==u[0]&&(this.options.lng=u[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(function(e){t[e]=function(){var n;return(n=t.store)[e].apply(n,arguments),t}});var c=O(),p=function(){var e=function(e,r){t.isInitialized&&!t.initializedStoreOnce&&t.logger.warn("init: i18next is already initialized. You should call init just once!"),t.isInitialized=!0,t.options.isClone||t.logger.log("initialized",t.options),t.emit("initialized",t.options),c.resolve(r),n(e,r)};if(t.languages&&"v1"!==t.options.compatibilityAPI&&!t.isInitialized)return e(null,t.t.bind(t));t.changeLanguage(t.options.lng,e)};return this.options.resources||!this.options.initImmediate?p():setTimeout(p,0),c}},{key:"loadResources",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:to,r=n,i="string"==typeof t?t:this.language;if("function"==typeof t&&(r=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(t){t&&e.services.languageUtils.toResolveHierarchy(t).forEach(function(t){0>o.indexOf(t)&&o.push(t)})};i?s(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(function(t){return s(t)}),this.options.preload&&this.options.preload.forEach(function(t){return s(t)}),this.services.backendConnector.load(o,this.options.ns,function(t){t||e.resolvedLanguage||!e.language||e.setResolvedLanguage(e.language),r(t)})}else r(null)}},{key:"reloadResources",value:function(t,e,n){var r=O();return t||(t=this.languages),e||(e=this.options.ns),n||(n=to),this.services.backendConnector.reload(t,e,function(t){r.resolve(),n(t)}),r}},{key:"use",value:function(t){if(!t)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===t.type&&(this.modules.backend=t),("logger"===t.type||t.log&&t.warn&&t.error)&&(this.modules.logger=t),"languageDetector"===t.type&&(this.modules.languageDetector=t),"i18nFormat"===t.type&&(this.modules.i18nFormat=t),"postProcessor"===t.type&&N.addPostProcessor(t),"formatter"===t.type&&(this.modules.formatter=t),"3rdParty"===t.type&&this.modules.external.push(t),this}},{key:"setResolvedLanguage",value:function(t){if(t&&this.languages&&!(["cimode","dev"].indexOf(t)>-1))for(var e=0;e<this.languages.length;e++){var n=this.languages[e];if(!(["cimode","dev"].indexOf(n)>-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(t,e){var n=this;this.isLanguageChangingTo=t;var r=O();this.emit("languageChanging",t);var i=function(t){n.language=t,n.languages=n.services.languageUtils.toResolveHierarchy(t),n.resolvedLanguage=void 0,n.setResolvedLanguage(t)},o=function(t,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve(function(){return n.t.apply(n,arguments)}),e&&e(t,function(){return n.t.apply(n,arguments)})},s=function(e){t||e||!n.services.languageDetector||(e=[]);var r="string"==typeof e?e:n.services.languageUtils.getBestMatchFromCodes(e);r&&(n.language||i(r),n.translator.language||n.translator.changeLanguage(r),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage(r)),n.loadResources(r,function(t){o(t,r)})};return t||!this.services.languageDetector||this.services.languageDetector.async?!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(s):s(t):s(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(t,e,n){var i=this,o=function t(e,o){if("object"!==r(o)){for(var s,a=arguments.length,l=Array(a>2?a-2:0),u=2;u<a;u++)l[u-2]=arguments[u];s=i.options.overloadTranslationOptionHandler([e,o].concat(l))}else s=ti({},o);s.lng=s.lng||t.lng,s.lngs=s.lngs||t.lngs,s.ns=s.ns||t.ns,s.keyPrefix=s.keyPrefix||n||t.keyPrefix;var c=i.options.keySeparator||".",p=s.keyPrefix?"".concat(s.keyPrefix).concat(c).concat(e):e;return i.t(p,s)};return"string"==typeof t?o.lng=t:o.lngs=t,o.ns=e,o.keyPrefix=n,o}},{key:"t",value:function(){var t;return this.translator&&(t=this.translator).translate.apply(t,arguments)}},{key:"exists",value:function(){var t;return this.translator&&(t=this.translator).exists.apply(t,arguments)}},{key:"setDefaultNamespace",value:function(t){this.options.defaultNS=t}},{key:"hasLoadedNamespace",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?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 r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(t,n){var r=e.services.backendConnector.state["".concat(t,"|").concat(n)];return -1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!(this.hasResourceBundle(r,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||s(r,t)&&(!i||s(o,t)))}},{key:"loadNamespaces",value:function(t,e){var n=this,r=O();return this.options.ns?("string"==typeof t&&(t=[t]),t.forEach(function(t){0>n.options.ns.indexOf(t)&&n.options.ns.push(t)}),this.loadResources(function(t){r.resolve(),e&&e(t)}),r):(e&&e(),Promise.resolve())}},{key:"loadLanguages",value:function(t,e){var n=O();"string"==typeof t&&(t=[t]);var r=this.options.preload||[],i=t.filter(function(t){return 0>r.indexOf(t)});return i.length?(this.options.preload=r.concat(i),this.loadResources(function(t){n.resolve(),e&&e(t)}),n):(e&&e(),Promise.resolve())}},{key:"dir",value:function(t){return(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),t)?["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(this.services.languageUtils.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr":"rtl"}},{key:"cloneInstance",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:to,r=ti(ti(ti({},this.options),e),{isClone:!0}),i=new o(r);return(void 0!==e.debug||void 0!==e.prefix)&&(i.logger=i.logger.clone(e)),["store","services","language"].forEach(function(e){i[e]=t[e]}),i.services=ti({},this.services),i.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i.translator=new I(i.services,i.options),i.translator.on("*",function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];i.emit.apply(i,[t].concat(n))}),i.init(r,n),i.translator.options=i.options,i.translator.backendConnector.services.utils={hasLoadedNamespace:i.hasLoadedNamespace.bind(i)},i}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),o}(b);f(ts,"createInstance",function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;return new ts(t,e)});var ta=ts.createInstance();ta.createInstance=ts.createInstance,ta.createInstance,ta.init,ta.loadResources,ta.reloadResources,ta.use,ta.changeLanguage,ta.getFixedT,ta.t,ta.exists,ta.setDefaultNamespace,ta.hasLoadedNamespace,ta.loadNamespaces,ta.loadLanguages;let tl=ta,tu=globalThis,tc=tu.ShadowRoot&&(void 0===tu.ShadyCSS||tu.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,tp=Symbol(),th=new WeakMap;class tf{constructor(t,e,n){if(this._$cssResult$=!0,n!==tp)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(tc&&void 0===t){let n=void 0!==e&&1===e.length;n&&(t=th.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&th.set(e,t))}return t}toString(){return this.cssText}}let td=tc?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(let n of t.cssRules)e+=n.cssText;return(t=>new tf("string"==typeof t?t:t+"",void 0,tp))(e)})(t):t,{is:tg,defineProperty:tv,getOwnPropertyDescriptor:ty,getOwnPropertyNames:tm,getOwnPropertySymbols:tb,getPrototypeOf:tO}=Object,tk=globalThis,tS=tk.trustedTypes,tx=tS?tS.emptyScript:"",tw=tk.reactiveElementPolyfillSupport,tP={toAttribute(t,e){switch(e){case Boolean:t=t?tx:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},t$=(t,e)=>!tg(t,e),t_={attribute:!0,type:String,converter:tP,reflect:!1,useDefault:!1,hasChanged:t$};Symbol.metadata??=Symbol("metadata"),tk.litPropertyMetadata??=new WeakMap;class tj extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=t_){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let n=Symbol(),r=this.getPropertyDescriptor(t,n,e);void 0!==r&&tv(this.prototype,t,r)}}static getPropertyDescriptor(t,e,n){let{get:r,set:i}=ty(this.prototype,t)??{get(){return this[e]},set(t){this[e]=t}};return{get:r,set(e){let o=r?.call(this);i?.call(this,e),this.requestUpdate(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??t_}static _$Ei(){if(this.hasOwnProperty("elementProperties"))return;let t=tO(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty("finalized"))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty("properties")){let t=this.properties;for(let e of[...tm(t),...tb(t)])this.createProperty(e,t[e])}let t=this[Symbol.metadata];if(null!==t){let e=litPropertyMetadata.get(t);if(void 0!==e)for(let[t,n]of e)this.elementProperties.set(t,n)}for(let[t,e]of(this._$Eh=new Map,this.elementProperties)){let n=this._$Eu(t,e);void 0!==n&&this._$Eh.set(n,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t))for(let n of new Set(t.flat(1/0).reverse()))e.unshift(td(n));else void 0!==t&&e.push(td(t));return e}static _$Eu(t,e){let n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map;for(let e of this.constructor.elementProperties.keys())this.hasOwnProperty(e)&&(t.set(e,this[e]),delete this[e]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{if(tc)t.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let n of e){let e=document.createElement("style"),r=tu.litNonce;void 0!==r&&e.setAttribute("nonce",r),e.textContent=n.cssText,t.appendChild(e)}})(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$ET(t,e){let n=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,n);if(void 0!==r&&!0===n.reflect){let i=(void 0!==n.converter?.toAttribute?n.converter:tP).toAttribute(e,n.type);this._$Em=t,null==i?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let n=this.constructor,r=n._$Eh.get(t);if(void 0!==r&&this._$Em!==r){let t=n.getPropertyOptions(r),i="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:tP;this._$Em=r;let o=i.fromAttribute(e,t.type);this[r]=o??this._$Ej?.get(r)??o,this._$Em=null}}requestUpdate(t,e,n){if(void 0!==t){let r=this.constructor,i=this[t];if(!(((n??=r.getPropertyOptions(t)).hasChanged??t$)(i,e)||n.useDefault&&n.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,n))))return;this.C(t,e,n)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,e,{useDefault:n,reflect:r,wrapped:i},o){n&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,o??e??this[t]),!0!==i||void 0!==o)||(this._$AL.has(t)||(this.hasUpdated||n||(e=void 0),this._$AL.set(t,e)),!0===r&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[t,e]of this._$Ep)this[t]=e;this._$Ep=void 0}let t=this.constructor.elementProperties;if(t.size>0)for(let[e,n]of t){let{wrapped:t}=n,r=this[e];!0!==t||this._$AL.has(e)||void 0===r||this.C(e,void 0,n,r)}}let t=!1,e=this._$AL;try{(t=this.shouldUpdate(e))?(this.willUpdate(e),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(e)):this._$EM()}catch(e){throw t=!1,this._$EM(),e}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(t){}firstUpdated(t){}}tj.elementStyles=[],tj.shadowRootOptions={mode:"open"},tj.elementProperties=new Map,tj.finalized=new Map,tw?.({ReactiveElement:tj}),(tk.reactiveElementVersions??=[]).push("2.1.1");let tA=globalThis,tE=tA.trustedTypes,tC=tE?tE.createPolicy("lit-html",{createHTML:t=>t}):void 0,tR="$lit$",tL=`lit$${Math.random().toFixed(9).slice(2)}$`,tN="?"+tL,tT=`<${tN}>`,tU=document,tD=()=>tU.createComment(""),tI=t=>null===t||"object"!=typeof t&&"function"!=typeof t,tM=Array.isArray,tH="[ \n\f\r]",tF=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tV=/-->/g,tz=/>/g,tB=RegExp(`>|${tH}(?:([^\\s"'>=/]+)(${tH}*=${tH}*(?:[^
|
|
2
2
|
\f\r"'\`<>=]|("|')|))|$)`,"g"),tK=/'/g,tJ=/"/g,tq=/^(?:script|style|textarea|title)$/i,tW=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),tY=tW(1),tG=(tW(2),tW(3),Symbol.for("lit-noChange")),tZ=Symbol.for("lit-nothing"),tQ=new WeakMap,tX=tU.createTreeWalker(tU,129);function t0(t,e){if(!tM(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==tC?tC.createHTML(e):e}class t1{constructor({strings:t,_$litType$:e},n){let r;this.parts=[];let i=0,o=0,s=t.length-1,a=this.parts,[l,u]=((t,e)=>{let n=t.length-1,r=[],i,o=2===e?"<svg>":3===e?"<math>":"",s=tF;for(let e=0;e<n;e++){let n=t[e],a,l,u=-1,c=0;for(;c<n.length&&(s.lastIndex=c,null!==(l=s.exec(n)));)c=s.lastIndex,s===tF?"!--"===l[1]?s=tV:void 0!==l[1]?s=tz:void 0!==l[2]?(tq.test(l[2])&&(i=RegExp("</"+l[2],"g")),s=tB):void 0!==l[3]&&(s=tB):s===tB?">"===l[0]?(s=i??tF,u=-1):void 0===l[1]?u=-2:(u=s.lastIndex-l[2].length,a=l[1],s=void 0===l[3]?tB:'"'===l[3]?tJ:tK):s===tJ||s===tK?s=tB:s===tV||s===tz?s=tF:(s=tB,i=void 0);let p=s===tB&&t[e+1].startsWith("/>")?" ":"";o+=s===tF?n+tT:u>=0?(r.push(a),n.slice(0,u)+tR+n.slice(u)+tL+p):n+tL+(-2===u?e:p)}return[t0(t,o+(t[n]||"<?>")+(2===e?"</svg>":3===e?"</math>":"")),r]})(t,e);if(this.el=t1.createElement(l,n),tX.currentNode=this.el.content,2===e||3===e){let t=this.el.content.firstChild;t.replaceWith(...t.childNodes)}for(;null!==(r=tX.nextNode())&&a.length<s;){if(1===r.nodeType){if(r.hasAttributes())for(let t of r.getAttributeNames())if(t.endsWith(tR)){let e=u[o++],n=r.getAttribute(t).split(tL),s=/([.?@])?(.*)/.exec(e);a.push({type:1,index:i,name:s[2],strings:n,ctor:"."===s[1]?t5:"?"===s[1]?t6:"@"===s[1]?t7:t4}),r.removeAttribute(t)}else t.startsWith(tL)&&(a.push({type:6,index:i}),r.removeAttribute(t));if(tq.test(r.tagName)){let t=r.textContent.split(tL),e=t.length-1;if(e>0){r.textContent=tE?tE.emptyScript:"";for(let n=0;n<e;n++)r.append(t[n],tD()),tX.nextNode(),a.push({type:2,index:++i});r.append(t[e],tD())}}}else if(8===r.nodeType)if(r.data===tN)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=r.data.indexOf(tL,t+1));)a.push({type:7,index:i}),t+=tL.length-1}i++}}static createElement(t,e){let n=tU.createElement("template");return n.innerHTML=t,n}}function t2(t,e,n=t,r){if(e===tG)return e;let i=void 0!==r?n._$Co?.[r]:n._$Cl,o=tI(e)?void 0:e._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),void 0===o?i=void 0:(i=new o(t))._$AT(t,n,r),void 0!==r?(n._$Co??=[])[r]=i:n._$Cl=i),void 0!==i&&(e=t2(t,i._$AS(t,e.values),i,r)),e}class t3{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:n}=this._$AD,r=(t?.creationScope??tU).importNode(e,!0);tX.currentNode=r;let i=tX.nextNode(),o=0,s=0,a=n[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new t8(i,i.nextSibling,this,t):1===a.type?e=new a.ctor(i,a.name,a.strings,this,t):6===a.type&&(e=new t9(i,this,t)),this._$AV.push(e),a=n[++s]}o!==a?.index&&(i=tX.nextNode(),o++)}return tX.currentNode=tU,r}p(t){let e=0;for(let n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class t8{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,n,r){this.type=2,this._$AH=tZ,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return void 0!==e&&11===t?.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){let n;tI(t=t2(this,t,e))?t===tZ||null==t||""===t?(this._$AH!==tZ&&this._$AR(),this._$AH=tZ):t!==this._$AH&&t!==tG&&this._(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):tM(n=t)||"function"==typeof n?.[Symbol.iterator]?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==tZ&&tI(this._$AH)?this._$AA.nextSibling.data=t:this.T(tU.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:n}=t,r="number"==typeof n?this._$AC(t):(void 0===n.el&&(n.el=t1.createElement(t0(n.h,n.h[0]),this.options)),n);if(this._$AH?._$AD===r)this._$AH.p(e);else{let t=new t3(r,this),n=t.u(this.options);t.p(e),this.T(n),this._$AH=t}}_$AC(t){let e=tQ.get(t.strings);return void 0===e&&tQ.set(t.strings,e=new t1(t)),e}k(t){tM(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,n,r=0;for(let i of t)r===e.length?e.push(n=new t8(this.O(tD()),this.O(tD()),this,this.options)):n=e[r],n._$AI(i),r++;r<e.length&&(this._$AR(n&&n._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let e=t.nextSibling;t.remove(),t=e}}setConnected(t){void 0===this._$AM&&(this._$Cv=t,this._$AP?.(t))}}class t4{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,n,r,i){this.type=1,this._$AH=tZ,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=tZ}_$AI(t,e=this,n,r){let i=this.strings,o=!1;if(void 0===i)(o=!tI(t=t2(this,t,e,0))||t!==this._$AH&&t!==tG)&&(this._$AH=t);else{let r,s,a=t;for(t=i[0],r=0;r<i.length-1;r++)(s=t2(this,a[n+r],e,r))===tG&&(s=this._$AH[r]),o||=!tI(s)||s!==this._$AH[r],s===tZ?t=tZ:t!==tZ&&(t+=(s??"")+i[r+1]),this._$AH[r]=s}o&&!r&&this.j(t)}j(t){t===tZ?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}}class t5 extends t4{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===tZ?void 0:t}}class t6 extends t4{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==tZ)}}class t7 extends t4{constructor(t,e,n,r,i){super(t,e,n,r,i),this.type=5}_$AI(t,e=this){if((t=t2(this,t,e,0)??tZ)===tG)return;let n=this._$AH,r=t===tZ&&n!==tZ||t.capture!==n.capture||t.once!==n.once||t.passive!==n.passive,i=t!==tZ&&(n===tZ||r);r&&this.element.removeEventListener(this.name,this,n),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){"function"==typeof this._$AH?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}}class t9{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){t2(this,t)}}let et=tA.litHtmlPolyfillSupport;et?.(t1,t8),(tA.litHtmlVersions??=[]).push("3.3.1");let ee=globalThis;class en extends tj{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,n)=>{let r=n?.renderBefore??e,i=r._$litPart$;if(void 0===i){let t=n?.renderBefore??null;r._$litPart$=i=new t8(e.insertBefore(tD(),t),t,void 0,n??{})}return i._$AI(t),i})(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return tG}}en._$litElement$=!0,en.finalized=!0,ee.litElementHydrateSupport?.({LitElement:en});let er=ee.litElementPolyfillSupport;er?.({LitElement:en}),(ee.litElementVersions??=[]).push("4.2.1");let ei={attribute:!0,type:String,converter:tP,reflect:!1,hasChanged:t$};function eo(t){return(e,n)=>"object"==typeof n?((t=ei,e,n)=>{let{kind:r,metadata:i}=n,o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),"setter"===r&&((t=Object.create(t)).wrapped=!0),o.set(n.name,t),"accessor"===r){let{name:r}=n;return{set(n){let i=e.get.call(this);e.set.call(this,n),this.requestUpdate(r,i,t)},init(e){return void 0!==e&&this.C(r,void 0,t,e),e}}}if("setter"===r){let{name:r}=n;return function(n){let i=this[r];e.call(this,n),this.requestUpdate(r,i,t)}}throw Error("Unsupported decorator location: "+r)})(t,e,n):((t,e,n)=>{let r=e.hasOwnProperty(n);return e.constructor.createProperty(n,t),r?Object.getOwnPropertyDescriptor(e,n):void 0})(t,e,n)}var es=function(t,e,n,r){var i,o=arguments.length,s=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(o<3?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s};let ea=class extends n(tl)(en){render(){return tY`
|
|
3
3
|
${this._getTranslatedValue()}
|
|
4
4
|
`}_getTranslatedValue(){return this.value?tl.isInitialized?tl.t(this.value,this.options):this.value:""}};return ea.styles=((t,...e)=>new tf(1===t.length?t[0]:e.reduce((e,n,r)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[r+1],t[0]),t,tp))`
|