From cf7c24cf0e3ef2658991af80ace629ef4638b667 Mon Sep 17 00:00:00 2001 From: Tatiana Savina Date: Fri, 20 Sep 2024 11:12:06 +0200 Subject: [PATCH] [Docs] Port release docs (#26689) ### Details: - *item1* - *...* ### Tickets: - *ticket-id* --------- Co-authored-by: Karol Blaszczak Co-authored-by: Alexander Suvorov --- .../about-openvino/key-features.rst | 70 +++++++++---------- .../about-openvino/release-notes-openvino.rst | 24 ++++++- .../get-started/install-openvino.rst | 2 +- ...ector-83076730.js => selector-4f9c3c09.js} | 32 ++++----- ...tor-9dbd5b1.html => selector-8d4cf1d.html} | 6 +- 5 files changed, 76 insertions(+), 58 deletions(-) rename docs/sphinx_setup/_static/selector-tool/assets/{selector-83076730.js => selector-4f9c3c09.js} (51%) rename docs/sphinx_setup/_static/selector-tool/{selector-9dbd5b1.html => selector-8d4cf1d.html} (77%) diff --git a/docs/articles_en/about-openvino/key-features.rst b/docs/articles_en/about-openvino/key-features.rst index 128d3947b3b402..6514bdc67a3302 100644 --- a/docs/articles_en/about-openvino/key-features.rst +++ b/docs/articles_en/about-openvino/key-features.rst @@ -5,65 +5,65 @@ Easy Integration ######################### | :doc:`Support for multiple frameworks <../openvino-workflow/model-preparation/convert-model-to-ir>` -| Use deep learning models from PyTorch, TensorFlow, TensorFlow Lite, PaddlePaddle, and ONNX - directly or convert them to the optimized OpenVINO IR format for improved performance. +| Use deep learning models from PyTorch, TensorFlow, TensorFlow Lite, PaddlePaddle, and ONNX + directly or convert them to the optimized OpenVINO IR format for improved performance. | :doc:`Close integration with PyTorch <../openvino-workflow/torch-compile>` -| For PyTorch-based applications, specify OpenVINO as a backend using - :doc:`torch.compile <../openvino-workflow/torch-compile>` to improve model inference. Apply - OpenVINO optimizations to your PyTorch models directly with a single line of code. +| For PyTorch-based applications, specify OpenVINO as a backend using + :doc:`torch.compile <../openvino-workflow/torch-compile>` to improve model inference. Apply + OpenVINO optimizations to your PyTorch models directly with a single line of code. | :doc:`GenAI Out Of The Box <../learn-openvino/llm_inference_guide/genai-guide>` -| With the genAI flavor of OpenVINO, you can run generative AI with just a couple lines of code. - Check out the GenAI guide for instructions on how to do it. +| With the genAI flavor of OpenVINO, you can run generative AI with just a couple lines of code. + Check out the GenAI guide for instructions on how to do it. | `Python / C++ / C / NodeJS APIs `__ -| OpenVINO offers the C++ API as a complete set of available methods. For less resource-critical - solutions, the Python API provides almost full coverage, while C and NodeJS ones are limited - to the methods most basic for their typical environments. The NodeJS API, is still in its - early and active development. +| OpenVINO offers the C++ API as a complete set of available methods. For less resource-critical + solutions, the Python API provides almost full coverage, while C and NodeJS ones are limited + to the methods most basic for their typical environments. The NodeJS API, is still in its + early and active development. | :doc:`Open source and easy to extend <../about-openvino/contributing>` -| If you need a particular feature or inference accelerator to be supported, you are free to file - a feature request or develop new components specific to your projects yourself. As open source, - OpenVINO may be used and modified freely. See the extensibility guide for more information on - how to adapt it to your needs. +| If you need a particular feature or inference accelerator to be supported, you are free to file + a feature request or develop new components specific to your projects yourself. As open source, + OpenVINO may be used and modified freely. See the extensibility guide for more information on + how to adapt it to your needs. Deployment ######################### | :doc:`Local or remote <../openvino-workflow>` -| Integrate the OpenVINO runtime directly with your application to run inference locally or use - `OpenVINO Model Server `__ to shift the inference - workload to a remote system, a separate server or a Kubernetes environment. For serving, - OpenVINO is also integrated with `vLLM `__ - and `Triton `__ services. +| Integrate the OpenVINO runtime directly with your application to run inference locally or use + `OpenVINO Model Server `__ to shift the inference + workload to a remote system, a separate server or a Kubernetes environment. For serving, + OpenVINO is also integrated with `vLLM `__ + and `Triton `__ services. | :doc:`Scalable and portable ` -| Write an application once, deploy it anywhere, always making the most out of your hardware setup. - The automatic device selection mode gives you the ultimate deployment flexibility on all major - operating systems. Check out system requirements. +| Write an application once, deploy it anywhere, always making the most out of your hardware setup. + The automatic device selection mode gives you the ultimate deployment flexibility on all major + operating systems. Check out system requirements. | **Light-weight** -| Designed with minimal external dependencies, OpenVINO does not bloat your application - and simplifies installation and dependency management. The custom compilation for your specific - model(s) may further reduce the final binary size. +| Designed with minimal external dependencies, OpenVINO does not bloat your application + and simplifies installation and dependency management. The custom compilation for your specific + model(s) may further reduce the final binary size. Performance ######################### | :doc:`Model Optimization <../openvino-workflow/model-optimization>` -| Optimize your deep learning models with NNCF, using various training-time and post-training - compression methods, such as pruning, sparsity, quantization, and weight compression. Make - your models take less space, run faster, and use less resources. +| Optimize your deep learning models with NNCF, using various training-time and post-training + compression methods, such as pruning, sparsity, quantization, and weight compression. Make + your models take less space, run faster, and use less resources. | :doc:`Top performance <../about-openvino/performance-benchmarks>` -| OpenVINO is optimized to work with Intel hardware, delivering confirmed high performance for - hundreds of models. Explore OpenVINO Performance Benchmarks to discover the optimal hardware - configurations and plan your AI deployment based on verified data. +| OpenVINO is optimized to work with Intel hardware, delivering confirmed high performance for + hundreds of models. Explore OpenVINO Performance Benchmarks to discover the optimal hardware + configurations and plan your AI deployment based on verified data. | :doc:`Enhanced App Start-Up Time <../openvino-workflow/running-inference/optimize-inference>` -| If you need your application to launch immediately, OpenVINO will reduce first-inference latency, - running inference on CPU until a more suited device is ready to take over. Once a model - is compiled for inference, it is also cached, improving the start-up time even more. +| If you need your application to launch immediately, OpenVINO will reduce first-inference latency, + running inference on CPU until a more suited device is ready to take over. Once a model + is compiled for inference, it is also cached, improving the start-up time even more. diff --git a/docs/articles_en/about-openvino/release-notes-openvino.rst b/docs/articles_en/about-openvino/release-notes-openvino.rst index c60371119de69b..0e3e84cfdc2aad 100644 --- a/docs/articles_en/about-openvino/release-notes-openvino.rst +++ b/docs/articles_en/about-openvino/release-notes-openvino.rst @@ -15,7 +15,7 @@ OpenVINO Release Notes -2024.4 - 18 September 2024 +2024.4 - 19 September 2024 ############################# :doc:`System Requirements <./release-notes-openvino/system-requirements>` | :doc:`Release policy <./release-notes-openvino/release-policy>` | :doc:`Installation Guides <./../get-started/install-openvino>` @@ -203,8 +203,7 @@ OpenVINO Model Server * Ability to compress the KV Cache to a lower precision, reducing memory consumption without a significant loss of accuracy. * ``stop`` sampling parameters, to define a sequence that stops text generation. - * ``logprobs`` sampling parameter, returning the probabilities to returned tokens, which can - be used to calculate the model perplexity metric, among other things. + * ``logprobs`` sampling parameter, returning the probabilities to returned tokens. * Generic metrics related to execution of the MediaPipe graph that can be used for autoscaling based on the current load and the level of concurrency. * `Demo of text generation horizontal scalability `__ @@ -212,6 +211,7 @@ OpenVINO Model Server * Automatic cancelling of text generation for disconnected clients. * Non-UTF-8 responses from the model can be now automatically changed to Unicode replacement characters, due to their configurable handling. + * Intel GPU with paged attention is now supported. * Support for Llama3.1 models. * The following has been improved: @@ -301,6 +301,24 @@ Known Issues | OpenVINO.GenAI archive doesn't have debug libraries for OpenVINO Tokenizers and OpenVINO.GenAI. +| **Component: ONNX for ARM** +| ID: n/a +| Description: +| For ARM binaries, the `1.16 ONNX library `__ + is not yet available, while the current latest has shown two significant vulnerabilities: + `CVE-2024-27318 `__ and + `CVE-2024-27319 `__. + The vulnerabilities are less severe in the context of OpenVINO and will be fixed as soon as + the most recent version of the library is available for ARM, expected at the 2024.5 release. + + + + + + + + + diff --git a/docs/articles_en/get-started/install-openvino.rst b/docs/articles_en/get-started/install-openvino.rst index b843bc3682f0a9..6dda915af93b69 100644 --- a/docs/articles_en/get-started/install-openvino.rst +++ b/docs/articles_en/get-started/install-openvino.rst @@ -21,7 +21,7 @@ Install OpenVINO™ 2024.4 - + OpenVINO 2024.4, described here, is not a Long-Term-Support version! All currently supported versions are: diff --git a/docs/sphinx_setup/_static/selector-tool/assets/selector-83076730.js b/docs/sphinx_setup/_static/selector-tool/assets/selector-4f9c3c09.js similarity index 51% rename from docs/sphinx_setup/_static/selector-tool/assets/selector-83076730.js rename to docs/sphinx_setup/_static/selector-tool/assets/selector-4f9c3c09.js index c6a30484013d7a..0836ad1aed41f3 100644 --- a/docs/sphinx_setup/_static/selector-tool/assets/selector-83076730.js +++ b/docs/sphinx_setup/_static/selector-tool/assets/selector-4f9c3c09.js @@ -1,4 +1,4 @@ -var Xf=Object.defineProperty;var Jf=(e,t,n)=>t in e?Xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ze=(e,t,n)=>(Jf(e,typeof t!="symbol"?t+"":t,n),n);function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cc={exports:{}},po={},dc={exports:{}},D={};/** +var Xf=Object.defineProperty;var Jf=(e,t,n)=>t in e?Xf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ve=(e,t,n)=>(Jf(e,typeof t!="symbol"?t+"":t,n),n);function uc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var cc={exports:{}},po={},dc={exports:{}},D={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var Xf=Object.defineProperty;var Jf=(e,t,n)=>t in e?Xf(e,t,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var qr=Symbol.for("react.element"),Zf=Symbol.for("react.portal"),qf=Symbol.for("react.fragment"),ep=Symbol.for("react.strict_mode"),tp=Symbol.for("react.profiler"),np=Symbol.for("react.provider"),rp=Symbol.for("react.context"),ip=Symbol.for("react.forward_ref"),op=Symbol.for("react.suspense"),lp=Symbol.for("react.memo"),sp=Symbol.for("react.lazy"),Oa=Symbol.iterator;function ap(e){return e===null||typeof e!="object"?null:(e=Oa&&e[Oa]||e["@@iterator"],typeof e=="function"?e:null)}var fc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},pc=Object.assign,hc={};function sr(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||fc}sr.prototype.isReactComponent={};sr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};sr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function mc(){}mc.prototype=sr.prototype;function hs(e,t,n){this.props=e,this.context=t,this.refs=hc,this.updater=n||fc}var ms=hs.prototype=new mc;ms.constructor=hs;pc(ms,sr.prototype);ms.isPureReactComponent=!0;var _a=Array.isArray,gc=Object.prototype.hasOwnProperty,gs={current:null},vc={key:!0,ref:!0,__self:!0,__source:!0};function yc(e,t,n){var r,i={},o=null,l=null;if(t!=null)for(r in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(o=""+t.key),t)gc.call(t,r)&&!vc.hasOwnProperty(r)&&(i[r]=t[r]);var s=arguments.length-2;if(s===1)i.children=n;else if(1t in e?Xf(e,t,{enumerable:!0,config * LICENSE file in the root directory of this source tree. */var hp=U,mp=Symbol.for("react.element"),gp=Symbol.for("react.fragment"),vp=Object.prototype.hasOwnProperty,yp=hp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,wp={key:!0,ref:!0,__self:!0,__source:!0};function wc(e,t,n){var r,i={},o=null,l=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(l=t.ref);for(r in t)vp.call(t,r)&&!wp.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:mp,type:e,key:o,ref:l,props:i,_owner:yp.current}}po.Fragment=gp;po.jsx=wc;po.jsxs=wc;cc.exports=po;var ys=cc.exports;const Zn=ys.Fragment,v=ys.jsx,R=ys.jsxs;document.body.style.cssText+=` overflow: hidden; -`;const kp=()=>{const e={type:"size",height:document.body.offsetHeight};window.parent.postMessage(e)};new ResizeObserver(kp).observe(document.body);function pe(e){"@babel/helpers - typeof";return pe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pe(e)}function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sp(e,t){if(pe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(pe(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function kc(e){var t=Sp(e,"string");return pe(t)==="symbol"?t:String(t)}function Pa(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&arguments[1]!==void 0?arguments[1]:{};ft(this,e),this.init(t,n)}return pt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||Np,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),i=0;i1?r-1:0),o=1;o-1?s.replace(/###/g,"."):s}function i(){return!e||typeof e=="string"}for(var o=typeof t!="string"?[].concat(t):t.split(".");o.length>1;){if(i())return{};var l=r(o.shift());!e[l]&&n&&(e[l]=new n),Object.prototype.hasOwnProperty.call(e,l)?e=e[l]:e={}}return i()?{}:{obj:e,k:r(o.shift())}}function Ta(e,t,n){var r=ws(e,t,Object),i=r.obj,o=r.k;i[o]=n}function Ep(e,t,n,r){var i=ws(e,t,Object),o=i.obj,l=i.k;o[l]=o[l]||[],r&&(o[l]=o[l].concat(n)),r||o[l].push(n)}function zi(e,t){var n=ws(e,t),r=n.obj,i=n.k;if(r)return r[i]}function Ra(e,t,n){var r=zi(e,n);return r!==void 0?r:zi(t,n)}function Nc(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):Nc(e[r],t[r],n):e[r]=t[r]);return e}function Tn(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Cp={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Ip(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return Cp[t]}):e}var mo=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Tp=[" ",",","?","!",";"];function Rp(e,t,n){t=t||"",n=n||"";var r=Tp.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var i=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),o=!i.test(e);if(!o){var l=e.indexOf(n);l>0&&!i.test(e.substring(0,l))&&(o=!0)}return o}function La(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function si(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Pc(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+l;)l++,s=r.slice(o,o+l).join(n),a=i[s];if(a===void 0)return;if(a===null)return null;if(t.endsWith(s)){if(typeof a=="string")return a;if(s&&typeof a[s]=="string")return a[s]}var u=r.slice(o+l).join(n);return u?Pc(a,u,n):void 0}i=i[r[o]]}return i}}var Fp=function(e){ho(n,e);var t=Lp(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return ft(this,n),i=t.call(this),mo&&en.call(Ht(i)),i.data=r||{},i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.options.ignoreJSONStructure===void 0&&(i.options.ignoreJSONStructure=!0),i}return pt(n,[{key:"addNamespaces",value:function(i){this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}},{key:"removeNamespaces",value:function(i){var o=this.options.ns.indexOf(i);o>-1&&this.options.ns.splice(o,1)}},{key:"getResource",value:function(i,o,l){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,u=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,p=[i,o];l&&typeof l!="string"&&(p=p.concat(l)),l&&typeof l=="string"&&(p=p.concat(a?l.split(a):l)),i.indexOf(".")>-1&&(p=i.split("."));var d=zi(this.data,p);return d||!u||typeof l!="string"?d:Pc(this.data&&this.data[i]&&this.data[i][o],l,a)}},{key:"addResource",value:function(i,o,l,s){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},u=this.options.keySeparator;u===void 0&&(u=".");var p=[i,o];l&&(p=p.concat(u?l.split(u):l)),i.indexOf(".")>-1&&(p=i.split("."),s=o,o=p[1]),this.addNamespaces(o),Ta(this.data,p,s),a.silent||this.emit("added",i,o,l,s)}},{key:"addResources",value:function(i,o,l){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var a in l)(typeof l[a]=="string"||Object.prototype.toString.apply(l[a])==="[object Array]")&&this.addResource(i,o,a,l[a],{silent:!0});s.silent||this.emit("added",i,o,l)}},{key:"addResourceBundle",value:function(i,o,l,s,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},p=[i,o];i.indexOf(".")>-1&&(p=i.split("."),s=l,l=o,o=p[1]),this.addNamespaces(o);var d=zi(this.data,p)||{};s?Nc(d,l,a):d=si(si({},d),l),Ta(this.data,p,d),u.silent||this.emit("added",i,o,l)}},{key:"removeResourceBundle",value:function(i,o){this.hasResourceBundle(i,o)&&delete this.data[i][o],this.removeNamespaces(o),this.emit("removed",i,o)}},{key:"hasResourceBundle",value:function(i,o){return this.getResource(i,o)!==void 0}},{key:"getResourceBundle",value:function(i,o){return o||(o=this.options.defaultNS),this.options.compatibilityAPI==="v1"?si(si({},{}),this.getResource(i,o)):this.getResource(i,o)}},{key:"getDataByLanguage",value:function(i){return this.data[i]}},{key:"hasLanguageSomeTranslations",value:function(i){var o=this.getDataByLanguage(i),l=o&&Object.keys(o)||[];return!!l.find(function(s){return o[s]&&Object.keys(o[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(en),xc={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,i,o){var l=this;return t.forEach(function(s){l.processors[s]&&(n=l.processors[s].process(n,r,i,o))}),n}};function ja(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ke(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Fa={},Aa=function(e){ho(n,e);var t=Ap(n);function n(r){var i,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return ft(this,n),i=t.call(this),mo&&en.call(Ht(i)),xp(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Ht(i)),i.options=o,i.options.keySeparator===void 0&&(i.options.keySeparator="."),i.logger=wt.create("translator"),i}return pt(n,[{key:"changeLanguage",value:function(i){i&&(this.language=i)}},{key:"exists",value:function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(i==null)return!1;var l=this.resolve(i,o);return l&&l.res!==void 0}},{key:"extractFromKey",value:function(i,o){var l=o.nsSeparator!==void 0?o.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");var s=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,a=o.ns||this.options.defaultNS||[],u=l&&i.indexOf(l)>-1,p=!this.options.userDefinedKeySeparator&&!o.keySeparator&&!this.options.userDefinedNsSeparator&&!o.nsSeparator&&!Rp(i,l,s);if(u&&!p){var d=i.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:i,namespaces:a};var h=i.split(l);(l!==s||l===s&&this.options.ns.indexOf(h[0])>-1)&&(a=h.shift()),i=h.join(s)}return typeof a=="string"&&(a=[a]),{key:i,namespaces:a}}},{key:"translate",value:function(i,o,l){var s=this;if(pe(o)!=="object"&&this.options.overloadTranslationOptionHandler&&(o=this.options.overloadTranslationOptionHandler(arguments)),o||(o={}),i==null)return"";Array.isArray(i)||(i=[String(i)]);var a=o.returnDetails!==void 0?o.returnDetails:this.options.returnDetails,u=o.keySeparator!==void 0?o.keySeparator:this.options.keySeparator,p=this.extractFromKey(i[i.length-1],o),d=p.key,h=p.namespaces,g=h[h.length-1],y=o.lng||this.language,k=o.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y&&y.toLowerCase()==="cimode"){if(k){var _=o.nsSeparator||this.options.nsSeparator;return a?{res:"".concat(g).concat(_).concat(d),usedKey:d,exactUsedKey:d,usedLng:y,usedNS:g}:"".concat(g).concat(_).concat(d)}return a?{res:d,usedKey:d,exactUsedKey:d,usedLng:y,usedNS:g}:d}var f=this.resolve(i,o),c=f&&f.res,m=f&&f.usedKey||d,w=f&&f.exactUsedKey||d,O=Object.prototype.toString.apply(c),S=["[object Number]","[object Function]","[object RegExp]"],P=o.joinArrays!==void 0?o.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,j=typeof c!="string"&&typeof c!="boolean"&&typeof c!="number";if(x&&c&&j&&S.indexOf(O)<0&&!(typeof P=="string"&&O==="[object Array]")){if(!o.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var E=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,c,ke(ke({},o),{},{ns:h})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return a?(f.res=E,f):E}if(u){var W=O==="[object Array]",Ie=W?[]:{},_t=W?w:m;for(var nt in c)if(Object.prototype.hasOwnProperty.call(c,nt)){var En="".concat(_t).concat(u).concat(nt);Ie[nt]=this.translate(En,ke(ke({},o),{joinArrays:!1,ns:h})),Ie[nt]===En&&(Ie[nt]=c[nt])}c=Ie}}else if(x&&typeof P=="string"&&O==="[object Array]")c=c.join(P),c&&(c=this.extendTranslation(c,i,o,l));else{var ht=!1,rt=!1,C=o.count!==void 0&&typeof o.count!="string",L=n.hasDefaultValue(o),F=C?this.pluralResolver.getSuffix(y,o.count,o):"",V=o["defaultValue".concat(F)]||o.defaultValue;!this.isValidLookup(c)&&L&&(ht=!0,c=V),this.isValidLookup(c)||(rt=!0,c=d);var X=o.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,Nt=X&&rt?void 0:c,Ue=L&&V!==c&&this.options.updateMissing;if(rt||ht||Ue){if(this.logger.log(Ue?"updateKey":"missingKey",y,g,d,Ue?V:c),u){var Cn=this.resolve(d,ke(ke({},o),{},{keySeparator:!1}));Cn&&Cn.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 be=[],Pt=this.languageUtils.getFallbackCodes(this.options.fallbackLng,o.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Pt&&Pt[0])for(var Lo=0;Lo1&&arguments[1]!==void 0?arguments[1]:{},s,a,u,p,d;return typeof i=="string"&&(i=[i]),i.forEach(function(h){if(!o.isValidLookup(s)){var g=o.extractFromKey(h,l),y=g.key;a=y;var k=g.namespaces;o.options.fallbackNS&&(k=k.concat(o.options.fallbackNS));var _=l.count!==void 0&&typeof l.count!="string",f=_&&!l.ordinal&&l.count===0&&o.pluralResolver.shouldUseIntlApi(),c=l.context!==void 0&&(typeof l.context=="string"||typeof l.context=="number")&&l.context!=="",m=l.lngs?l.lngs:o.languageUtils.toResolveHierarchy(l.lng||o.language,l.fallbackLng);k.forEach(function(w){o.isValidLookup(s)||(d=w,!Fa["".concat(m[0],"-").concat(w)]&&o.utils&&o.utils.hasLoadedNamespace&&!o.utils.hasLoadedNamespace(d)&&(Fa["".concat(m[0],"-").concat(w)]=!0,o.logger.warn('key "'.concat(a,'" for languages "').concat(m.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(function(O){if(!o.isValidLookup(s)){p=O;var S=[y];if(o.i18nFormat&&o.i18nFormat.addLookupKeys)o.i18nFormat.addLookupKeys(S,y,O,w,l);else{var P;_&&(P=o.pluralResolver.getSuffix(O,l.count,l));var x="".concat(o.options.pluralSeparator,"zero");if(_&&(S.push(y+P),f&&S.push(y+x)),c){var j="".concat(y).concat(o.options.contextSeparator).concat(l.context);S.push(j),_&&(S.push(j+P),f&&S.push(j+x))}}for(var E;E=S.pop();)o.isValidLookup(s)||(u=E,s=o.getResource(O,w,E,l))}}))})}}),{res:s,usedKey:a,exactUsedKey:u,usedLng:p,usedNS:d}}},{key:"isValidLookup",value:function(i){return i!==void 0&&!(!this.options.returnNull&&i===null)&&!(!this.options.returnEmptyString&&i==="")}},{key:"getResource",value:function(i,o,l){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(i,o,l,s):this.resourceStore.getResource(i,o,l,s)}}],[{key:"hasDefaultValue",value:function(i){var o="defaultValue";for(var l in i)if(Object.prototype.hasOwnProperty.call(i,l)&&o===l.substring(0,o.length)&&i[l]!==void 0)return!0;return!1}}]),n}(en);function Do(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Da=function(){function e(t){ft(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=wt.create("languageUtils")}return pt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],i=n.split("-");return this.options.lowerCaseLng?i=i.map(function(o){return o.toLowerCase()}):i.length===2?(i[0]=i[0].toLowerCase(),i[1]=i[1].toUpperCase(),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=Do(i[1].toLowerCase()))):i.length===3&&(i[0]=i[0].toLowerCase(),i[1].length===2&&(i[1]=i[1].toUpperCase()),i[0]!=="sgn"&&i[2].length===2&&(i[2]=i[2].toUpperCase()),r.indexOf(i[1].toLowerCase())>-1&&(i[1]=Do(i[1].toLowerCase())),r.indexOf(i[2].toLowerCase())>-1&&(i[2]=Do(i[2].toLowerCase()))),i.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var i;return n.forEach(function(o){if(!i){var l=r.formatLanguageCode(o);(!r.options.supportedLngs||r.isSupportedCode(l))&&(i=l)}}),!i&&this.options.supportedLngs&&n.forEach(function(o){if(!i){var l=r.getLanguagePartFromCode(o);if(r.isSupportedCode(l))return i=l;i=r.options.supportedLngs.find(function(s){if(s.indexOf(l)===0)return s})}}),i||(i=this.getFallbackCodes(this.options.fallbackLng)[0]),i}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var i=n[r];return i||(i=n[this.getScriptPartFromCode(r)]),i||(i=n[this.formatLanguageCode(r)]),i||(i=n[this.getLanguagePartFromCode(r)]),i||(i=n.default),i||[]}},{key:"toResolveHierarchy",value:function(n,r){var i=this,o=this.getFallbackCodes(r||this.options.fallbackLng||[],n),l=[],s=function(u){u&&(i.isSupportedCode(u)?l.push(u):i.logger.warn("rejecting language code not found in supportedLngs: ".concat(u)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),o.forEach(function(a){l.indexOf(a)<0&&s(i.formatLanguageCode(a))}),l}}]),e}(),Up=[{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}],bp={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return 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 t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},zp=["v1","v2","v3"],Ua={zero:0,one:1,two:2,few:3,many:4,other:5};function Vp(){var e={};return Up.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:bp[t.fc]}})}),e}var Mp=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ft(this,e),this.languageUtils=t,this.options=n,this.logger=wt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Vp()}return pt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=this.getRule(n,r);return this.shouldUseIntlApi()?i&&i.resolvedOptions().pluralCategories.length>1:i&&i.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,i).map(function(o){return"".concat(r).concat(o)})}},{key:"getSuffixes",value:function(n){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort(function(l,s){return Ua[l]-Ua[s]}).map(function(l){return"".concat(r.options.prepend).concat(l)}):o.numbers.map(function(l){return r.getSuffix(n,l,i)}):[]}},{key:"getSuffix",value:function(n,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=this.getRule(n,i);return o?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(o.select(r)):this.getSuffixRetroCompatible(o,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var i=this,o=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),l=n.numbers[o];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(l===2?l="plural":l===1&&(l=""));var s=function(){return i.options.prepend&&l.toString()?i.options.prepend+l.toString():l.toString()};return this.options.compatibilityJSON==="v1"?l===1?"":typeof l=="number"?"_plural_".concat(l.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}},{key:"shouldUseIntlApi",value:function(){return!zp.includes(this.options.compatibilityJSON)}}]),e}();function ba(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function it(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:{};ft(this,e),this.logger=wt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return pt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:Ip,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?Tn(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?Tn(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?Tn(r.nestingPrefix):r.nestingPrefixEscaped||Tn("$t("),this.nestingSuffix=r.nestingSuffix?Tn(r.nestingSuffix):r.nestingSuffixEscaped||Tn(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var i="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(i,"g")}},{key:"interpolate",value:function(n,r,i,o){var l=this,s,a,u,p=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(_){return _.replace(/\$/g,"$$$$")}var h=function(f){if(f.indexOf(l.formatSeparator)<0){var c=Ra(r,p,f);return l.alwaysFormat?l.format(c,void 0,i,it(it(it({},o),r),{},{interpolationkey:f})):c}var m=f.split(l.formatSeparator),w=m.shift().trim(),O=m.join(l.formatSeparator).trim();return l.format(Ra(r,p,w),O,i,it(it(it({},o),r),{},{interpolationkey:w}))};this.resetRegExp();var g=o&&o.missingInterpolationHandler||this.options.missingInterpolationHandler,y=o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,k=[{regex:this.regexpUnescape,safeValue:function(f){return d(f)}},{regex:this.regexp,safeValue:function(f){return l.escapeValue?d(l.escape(f)):d(f)}}];return k.forEach(function(_){for(u=0;s=_.regex.exec(n);){var f=s[1].trim();if(a=h(f),a===void 0)if(typeof g=="function"){var c=g(n,s,o);a=typeof c=="string"?c:""}else if(o&&Object.prototype.hasOwnProperty.call(o,f))a="";else if(y){a=s[0];continue}else l.logger.warn("missed to pass in variable ".concat(f," for interpolating ").concat(n)),a="";else typeof a!="string"&&!l.useRawValueToEscape&&(a=Ia(a));var m=_.safeValue(a);if(n=n.replace(s[0],m),y?(_.regex.lastIndex+=a.length,_.regex.lastIndex-=s[0].length):_.regex.lastIndex=0,u++,u>=l.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var i=this,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l,s,a;function u(g,y){var k=this.nestingOptionsSeparator;if(g.indexOf(k)<0)return g;var _=g.split(new RegExp("".concat(k,"[ ]*{"))),f="{".concat(_[1]);g=_[0],f=this.interpolate(f,a);var c=f.match(/'/g),m=f.match(/"/g);(c&&c.length%2===0&&!m||m.length%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),y&&(a=it(it({},y),a))}catch(w){return this.logger.warn("failed parsing options string in nesting for key ".concat(g),w),"".concat(g).concat(k).concat(f)}return delete a.defaultValue,g}for(;l=this.nestingRegexp.exec(n);){var p=[];a=it({},o),a=a.replace&&typeof a.replace!="string"?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;var d=!1;if(l[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(l[1])){var h=l[1].split(this.formatSeparator).map(function(g){return g.trim()});l[1]=h.shift(),p=h,d=!0}if(s=r(u.call(this,l[1].trim(),a),a),s&&l[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=Ia(s)),s||(this.logger.warn("missed to resolve ".concat(l[1]," for nesting ").concat(n)),s=""),d&&(s=p.reduce(function(g,y){return i.format(g,y,o.lng,it(it({},o),{},{interpolationkey:l[1].trim()}))},s.trim())),n=n.replace(l[0],s),this.regexp.lastIndex=0}return n}}]),e}();function za(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xt(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if(t==="currency"&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if(t==="relativetime"&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{var o=i.split(";");o.forEach(function(l){if(l){var s=l.split(":"),a=_p(s),u=a[0],p=a.slice(1),d=p.join(":").trim().replace(/^'+|'+$/g,"");n[u.trim()]||(n[u.trim()]=d),d==="false"&&(n[u.trim()]=!1),d==="true"&&(n[u.trim()]=!0),isNaN(d)||(n[u.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function Rn(e){var t={};return function(r,i,o){var l=i+JSON.stringify(o),s=t[l];return s||(s=e(i,o),t[l]=s),s(r)}}var Kp=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ft(this,e),this.logger=wt.create("formatter"),this.options=t,this.formats={number:Rn(function(n,r){var i=new Intl.NumberFormat(n,xt({},r));return function(o){return i.format(o)}}),currency:Rn(function(n,r){var i=new Intl.NumberFormat(n,xt(xt({},r),{},{style:"currency"}));return function(o){return i.format(o)}}),datetime:Rn(function(n,r){var i=new Intl.DateTimeFormat(n,xt({},r));return function(o){return i.format(o)}}),relativetime:Rn(function(n,r){var i=new Intl.RelativeTimeFormat(n,xt({},r));return function(o){return i.format(o,r.range||"day")}}),list:Rn(function(n,r){var i=new Intl.ListFormat(n,xt({},r));return function(o){return i.format(o)}})},this.init(t)}return pt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},i=r.interpolation;this.formatSeparator=i.formatSeparator?i.formatSeparator:i.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=Rn(r)}},{key:"format",value:function(n,r,i){var o=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=r.split(this.formatSeparator),a=s.reduce(function(u,p){var d=Bp(p),h=d.formatName,g=d.formatOptions;if(o.formats[h]){var y=u;try{var k=l&&l.formatParams&&l.formatParams[l.interpolationkey]||{},_=k.locale||k.lng||l.locale||l.lng||i;y=o.formats[h](u,_,xt(xt(xt({},g),l),k))}catch(f){o.logger.warn(f)}return y}else o.logger.warn("there was no format function for ".concat(h));return u},n);return a}}]),e}();function Va(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ma(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Gp(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var Yp=function(e){ho(n,e);var t=Hp(n);function n(r,i,o){var l,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return ft(this,n),l=t.call(this),mo&&en.call(Ht(l)),l.backend=r,l.store=i,l.services=o,l.languageUtils=o.languageUtils,l.options=s,l.logger=wt.create("backendConnector"),l.waitingReads=[],l.maxParallelReads=s.maxParallelReads||10,l.readingCalls=0,l.maxRetries=s.maxRetries>=0?s.maxRetries:5,l.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,l.state={},l.queue=[],l.backend&&l.backend.init&&l.backend.init(o,s.backend,s),l}return pt(n,[{key:"queueLoad",value:function(i,o,l,s){var a=this,u={},p={},d={},h={};return i.forEach(function(g){var y=!0;o.forEach(function(k){var _="".concat(g,"|").concat(k);!l.reload&&a.store.hasResourceBundle(g,k)?a.state[_]=2:a.state[_]<0||(a.state[_]===1?p[_]===void 0&&(p[_]=!0):(a.state[_]=1,y=!1,p[_]===void 0&&(p[_]=!0),u[_]===void 0&&(u[_]=!0),h[k]===void 0&&(h[k]=!0)))}),y||(d[g]=!0)}),(Object.keys(u).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(u),pending:Object.keys(p),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}},{key:"loaded",value:function(i,o,l){var s=i.split("|"),a=s[0],u=s[1];o&&this.emit("failedLoading",a,u,o),l&&this.store.addResourceBundle(a,u,l),this.state[i]=o?-1:2;var p={};this.queue.forEach(function(d){Ep(d.loaded,[a],u),Gp(d,i),o&&d.errors.push(o),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(h){p[h]||(p[h]={});var g=d.loaded[h];g.length&&g.forEach(function(y){p[h][y]===void 0&&(p[h][y]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(i,o,l){var s=this,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,p=arguments.length>5?arguments[5]:void 0;if(!i.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:i,ns:o,fcName:l,tried:a,wait:u,callback:p});return}this.readingCalls++;var d=function(k,_){if(s.readingCalls--,s.waitingReads.length>0){var f=s.waitingReads.shift();s.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(k&&_&&a2&&arguments[2]!==void 0?arguments[2]:{},a=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."),a&&a();typeof i=="string"&&(i=this.languageUtils.toResolveHierarchy(i)),typeof o=="string"&&(o=[o]);var u=this.queueLoad(i,o,s,a);if(!u.toLoad.length)return u.pending.length||a(),null;u.toLoad.forEach(function(p){l.loadOne(p)})}},{key:"load",value:function(i,o,l){this.prepareLoading(i,o,{},l)}},{key:"reload",value:function(i,o,l){this.prepareLoading(i,o,{reload:!0},l)}},{key:"loadOne",value:function(i){var o=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=i.split("|"),a=s[0],u=s[1];this.read(a,u,"read",void 0,void 0,function(p,d){p&&o.logger.warn("".concat(l,"loading namespace ").concat(u," for language ").concat(a," failed"),p),!p&&d&&o.logger.log("".concat(l,"loaded namespace ").concat(u," for language ").concat(a),d),o.loaded(i,p,d)})}},{key:"saveMissing",value:function(i,o,l,s,a){var u=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},p=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(o)){this.logger.warn('did not save key "'.concat(l,'" as the namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(l==null||l==="")){if(this.backend&&this.backend.create){var d=Ma(Ma({},u),{},{isUpdate:a}),h=this.backend.create.bind(this.backend);if(h.length<6)try{var g;h.length===5?g=h(i,o,l,s,d):g=h(i,o,l,s),g&&typeof g.then=="function"?g.then(function(y){return p(null,y)}).catch(p):p(null,g)}catch(y){p(y)}else h(i,o,l,s,p,d)}!i||!i[0]||this.store.addResource(i[0],o,l,s)}}}]),n}(en);function $a(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(pe(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),pe(t[2])==="object"||pe(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(i){n[i]=r[i]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,i){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function Ba(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function Ka(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function mt(e){for(var t=1;t"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ai(){}function Jp(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var Vi=function(e){ho(n,e);var t=Qp(n);function n(){var r,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;if(ft(this,n),r=t.call(this),mo&&en.call(Ht(r)),r.options=Ba(i),r.services={},r.logger=wt,r.modules={external:[]},Jp(Ht(r)),o&&!r.isInitialized&&!i.isClone){if(!r.options.initImmediate)return r.init(i,o),ei(r,Ht(r));setTimeout(function(){r.init(i,o)},0)}return r}return pt(n,[{key:"init",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1?arguments[1]:void 0;typeof o=="function"&&(l=o,o={}),!o.defaultNS&&o.defaultNS!==!1&&o.ns&&(typeof o.ns=="string"?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));var s=$a();this.options=mt(mt(mt({},s),this.options),Ba(o)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=mt(mt({},s.interpolation),this.options.interpolation)),o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator);function a(f){return f?typeof f=="function"?new f:f:null}if(!this.options.isClone){this.modules.logger?wt.init(a(this.modules.logger),this.options):wt.init(null,this.options);var u;this.modules.formatter?u=this.modules.formatter:typeof Intl<"u"&&(u=Kp);var p=new Da(this.options);this.store=new Fp(this.options.resources,this.options);var d=this.services;d.logger=wt,d.resourceStore=this.store,d.languageUtils=p,d.pluralResolver=new Mp(p,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),u&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=a(u),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new $p(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new Yp(a(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(f){for(var c=arguments.length,m=new Array(c>1?c-1:0),w=1;w1?c-1:0),w=1;w0&&h[0]!=="dev"&&(this.options.lng=h[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var g=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];g.forEach(function(f){i[f]=function(){var c;return(c=i.store)[f].apply(c,arguments)}});var y=["addResource","addResources","addResourceBundle","removeResourceBundle"];y.forEach(function(f){i[f]=function(){var c;return(c=i.store)[f].apply(c,arguments),i}});var k=fr(),_=function(){var c=function(w,O){i.isInitialized&&!i.initializedStoreOnce&&i.logger.warn("init: i18next is already initialized. You should call init just once!"),i.isInitialized=!0,i.options.isClone||i.logger.log("initialized",i.options),i.emit("initialized",i.options),k.resolve(O),l(w,O)};if(i.languages&&i.options.compatibilityAPI!=="v1"&&!i.isInitialized)return c(null,i.t.bind(i));i.changeLanguage(i.options.lng,c)};return this.options.resources||!this.options.initImmediate?_():setTimeout(_,0),k}},{key:"loadResources",value:function(i){var o=this,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ai,s=l,a=typeof i=="string"?i:this.language;if(typeof i=="function"&&(s=i),!this.options.resources||this.options.partialBundledLanguages){if(a&&a.toLowerCase()==="cimode")return s();var u=[],p=function(g){if(g){var y=o.services.languageUtils.toResolveHierarchy(g);y.forEach(function(k){u.indexOf(k)<0&&u.push(k)})}};if(a)p(a);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(h){return p(h)})}this.options.preload&&this.options.preload.forEach(function(h){return p(h)}),this.services.backendConnector.load(u,this.options.ns,function(h){!h&&!o.resolvedLanguage&&o.language&&o.setResolvedLanguage(o.language),s(h)})}else s(null)}},{key:"reloadResources",value:function(i,o,l){var s=fr();return i||(i=this.languages),o||(o=this.options.ns),l||(l=ai),this.services.backendConnector.reload(i,o,function(a){s.resolve(),l(a)}),s}},{key:"use",value:function(i){if(!i)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!i.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return i.type==="backend"&&(this.modules.backend=i),(i.type==="logger"||i.log&&i.warn&&i.error)&&(this.modules.logger=i),i.type==="languageDetector"&&(this.modules.languageDetector=i),i.type==="i18nFormat"&&(this.modules.i18nFormat=i),i.type==="postProcessor"&&xc.addPostProcessor(i),i.type==="formatter"&&(this.modules.formatter=i),i.type==="3rdParty"&&this.modules.external.push(i),this}},{key:"setResolvedLanguage",value:function(i){if(!(!i||!this.languages)&&!(["cimode","dev"].indexOf(i)>-1))for(var o=0;o-1)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}}},{key:"changeLanguage",value:function(i,o){var l=this;this.isLanguageChangingTo=i;var s=fr();this.emit("languageChanging",i);var a=function(h){l.language=h,l.languages=l.services.languageUtils.toResolveHierarchy(h),l.resolvedLanguage=void 0,l.setResolvedLanguage(h)},u=function(h,g){g?(a(g),l.translator.changeLanguage(g),l.isLanguageChangingTo=void 0,l.emit("languageChanged",g),l.logger.log("languageChanged",g)):l.isLanguageChangingTo=void 0,s.resolve(function(){return l.t.apply(l,arguments)}),o&&o(h,function(){return l.t.apply(l,arguments)})},p=function(h){!i&&!h&&l.services.languageDetector&&(h=[]);var g=typeof h=="string"?h:l.services.languageUtils.getBestMatchFromCodes(h);g&&(l.language||a(g),l.translator.language||l.translator.changeLanguage(g),l.services.languageDetector&&l.services.languageDetector.cacheUserLanguage&&l.services.languageDetector.cacheUserLanguage(g)),l.loadResources(g,function(y){u(y,g)})};return!i&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!i&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(i),s}},{key:"getFixedT",value:function(i,o,l){var s=this,a=function u(p,d){var h;if(pe(d)!=="object"){for(var g=arguments.length,y=new Array(g>2?g-2:0),k=2;k1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],a=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var p=function(g,y){var k=o.services.backendConnector.state["".concat(g,"|").concat(y)];return k===-1||k===2};if(l.precheck){var d=l.precheck(this,p);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,i)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(s,i)&&(!a||p(u,i)))}},{key:"loadNamespaces",value:function(i,o){var l=this,s=fr();return this.options.ns?(typeof i=="string"&&(i=[i]),i.forEach(function(a){l.options.ns.indexOf(a)<0&&l.options.ns.push(a)}),this.loadResources(function(a){s.resolve(),o&&o(a)}),s):(o&&o(),Promise.resolve())}},{key:"loadLanguages",value:function(i,o){var l=fr();typeof i=="string"&&(i=[i]);var s=this.options.preload||[],a=i.filter(function(u){return s.indexOf(u)<0});return a.length?(this.options.preload=s.concat(a),this.loadResources(function(u){l.resolve(),o&&o(u)}),l):(o&&o(),Promise.resolve())}},{key:"dir",value:function(i){if(i||(i=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!i)return"rtl";var o=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services&&this.services.languageUtils||new Da($a());return o.indexOf(l.getLanguagePartFromCode(i))>-1||i.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var i=this,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ai,s=mt(mt(mt({},this.options),o),{isClone:!0}),a=new n(s);(o.debug!==void 0||o.prefix!==void 0)&&(a.logger=a.logger.clone(o));var u=["store","services","language"];return u.forEach(function(p){a[p]=i[p]}),a.services=mt({},this.services),a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a.translator=new Aa(a.services,a.options),a.translator.on("*",function(p){for(var d=arguments.length,h=new Array(d>1?d-1:0),g=1;g0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new Vi(e,t)});var ce=Vi.createInstance();ce.createInstance=Vi.createInstance;ce.createInstance;ce.dir;ce.init;ce.loadResources;ce.reloadResources;ce.use;ce.changeLanguage;ce.getFixedT;ce.t;ce.exists;ce.setDefaultNamespace;ce.hasLoadedNamespace;ce.loadNamespaces;ce.loadLanguages;function Zp(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o=0)&&(n[i]=e[i]);return n}function ks(e,t){if(e==null)return{};var n=Zp(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var qp={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};const eh=uc(qp);var th=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?(".*?"|'.*?')/g;function Ha(e){var t={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},n=e.match(/<\/?([^\s]+?)[/\s>]/);if(n&&(t.name=n[1],(eh[n[1]]||e.charAt(e.length-2)==="/")&&(t.voidElement=!0),t.name.startsWith("!--"))){var r=e.indexOf("-->");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var i=new RegExp(th),o=null;(o=i.exec(e))!==null;)if(o[0].trim())if(o[1]){var l=o[1].trim(),s=[l,""];l.indexOf("=")>-1&&(s=l.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var nh=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,rh=/^\s*$/,ih=Object.create(null);function Ec(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var i in n)r.push(i+'="'+n[i]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(Ec,"")+"";case"comment":return e+""}}var oh={parse:function(e,t){t||(t={}),t.components||(t.components=ih);var n,r=[],i=[],o=-1,l=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");r.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(nh,function(a,u){if(l){if(a!=="")return;l=!1}var p,d=a.charAt(1)!=="/",h=a.startsWith("");return{type:"comment",comment:r!==-1?e.slice(4,r):""}}for(var i=new RegExp(th),o=null;(o=i.exec(e))!==null;)if(o[0].trim())if(o[1]){var l=o[1].trim(),s=[l,""];l.indexOf("=")>-1&&(s=l.split("=")),t.attrs[s[0]]=s[1],i.lastIndex--}else o[2]&&(t.attrs[o[2]]=o[3].trim().substring(1,o[3].length-1));return t}var nh=/<[a-zA-Z0-9\-\!\/](?:"[^"]*"|'[^']*'|[^'">])*>/g,rh=/^\s*$/,ih=Object.create(null);function xc(e,t){switch(t.type){case"text":return e+t.content;case"tag":return e+="<"+t.name+(t.attrs?function(n){var r=[];for(var i in n)r.push(i+'="'+n[i]+'"');return r.length?" "+r.join(" "):""}(t.attrs):"")+(t.voidElement?"/>":">"),t.voidElement?e:e+t.children.reduce(xc,"")+"";case"comment":return e+""}}var oh={parse:function(e,t){t||(t={}),t.components||(t.components=ih);var n,r=[],i=[],o=-1,l=!1;if(e.indexOf("<")!==0){var s=e.indexOf("<");r.push({type:"text",content:s===-1?e:e.substring(0,s)})}return e.replace(nh,function(a,u){if(l){if(a!=="")return;l=!1}var p,d=a.charAt(1)!=="/",h=a.startsWith("