text: !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((e=e||self).ReactI18next={},e.React)}(this,(function(e,n){"use strict";var t="default"in n?n.default:n;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function a(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function c(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?a(Object(t),!0).forEach((function(n){o(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):a(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}function s(e,n){if(null==e)return{};var t,r,i=function(e,n){if(null==e)return{};var t,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||(i[t]=e[t]);return i}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)t=o[r],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}function u(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],r=!0,i=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(r=(a=c.next()).done)&&(t.push(a.value),!n||t.length!==n);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==c.return||c.return()}finally{if(i)throw o}}return t}(e,n)||function(e,n){if(!e)return;if("string"==typeof e)return l(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);"Object"===t&&e.constructor&&(t=e.constructor.name);if("Map"===t||"Set"===t)return Array.from(e);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return l(e,n)}(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}var f={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,menuitem:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},p=/([\w-]+)|=|(['"])([.\s\S]*?)\2/g,d=/(?:<!--[\S\s]*?-->|<(?:"[^"]*"['"]*|'[^']*'['"]*|[^'">])+>)/g,g=Object.create?Object.create(null):{};function m(e,n,t,r,i){var o=n.indexOf("<",r),a=n.slice(r,-1===o?void 0:o);/^\s*$/.test(a)&&(a=" "),(!i&&o>-1&&t+e.length>=0||" "!==a)&&e.push({type:"text",content:a})}var y,h=function(e,n){n||(n={}),n.components||(n.components=g);var t,r=[],i=-1,o=[],a={},c=!1;return e.replace(d,(function(s,u){if(c){if(s!=="</"+t.name+">")return;c=!1}var l,d="/"!==s.charAt(1),g=0===s.indexOf("\x3c!--"),y=u+s.length,h=e.charAt(y);d&&!g&&(i++,"tag"===(t=function(e){var n,t=0,r=!0,i={type:"tag",name:"",voidElement:!1,attrs:{},children:[]};return e.replace(p,(function(o){if("="===o)return r=!0,void t++;r?0===t?((f[o]||"/"===e.charAt(e.length-2))&&(i.voidElement=!0),i.name=o):(i.attrs[n]=o.replace(/^['"]|['"]$/g,""),n=void 0):(n&&(i.attrs[n]=n),n=o),t++,r=!1})),i}(s)).type&&n.components[t.name]&&(t.type="component",c=!0),t.voidElement||c||!h||"<"===h||m(t.children,e,i,y,n.ignoreWhitespace),a[t.tagName]=t,0===i&&r.push(t),(l=o[i-1])&&l.children.push(t),o[i]=t),(g||!d||t.voidElement)&&(g||i--,!c&&"<"!==h&&h&&m(l=-1===i?r:o[i].children,e,i,y,n.ignoreWhitespace))})),!r.length&&e.length&&m(r,e,0,0,n.ignoreWhitespace),r},v={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0},b=t.createContext();function O(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};v=c(c({},v),e)}function w(){return v}var j=function(){function e(){!function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),this.usedNamespaces={}}var n,t,r;return n=e,(t=[{key:"addUsedNamespaces",value:function(e){var n=this;e.forEach((function(e){n.usedNamespaces[e]||(n.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}])&&i(n.prototype,t),r&&i(n,r),e}();function S(e){y=e}function E(){return y}var N={type:"3rdParty",init:function(e){O(e.options.react),S(e)}};function x(e){return function(n){return new Promise((function(t){var r=I();e.getInitialProps?e.getInitialProps(n).then((function(e){t(c(c({},e),r))})):t(r)}))}}function I(){var e=E(),n=e.reportNamespaces?e.reportNamespaces.getUsedNamespaces():[],t={},r={};return e.languages.forEach((function(t){r[t]={},n.forEach((function(n){r[t][n]=e.getResourceBundle(t,n)||{}}))})),t.initialI18nStore=r,t.initialLanguage=e.language,t}function k(){if(console&&console.warn){for(var e,n=arguments.length,t=new Array(n),r=0;r<n;r++)t[r]=arguments[r];"string"==typeof t[0]&&(t[0]="react-i18next:: ".concat(t[0])),(e=console).warn.apply(e,t)}}var P={};function R(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];"string"==typeof n[0]&&P[n[0]]||("string"==typeof n[0]&&(P[n[0]]=new Date),k.apply(void 0,n))}function C(e,n,t){e.loadNamespaces(n,(function(){if(e.isInitialized)t();else{e.on("initialized",(function n(){setTimeout((function(){e.off("initialized",n)}),0),t()}))}}))}function A(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!n.languages||!n.languages.length)return R("i18n.languages were undefined or empty",n.languages),!0;var r=n.languages[0],i=!!n.options&&n.options.fallbackLng,o=n.languages[n.languages.length-1];if("cimode"===r.toLowerCase())return!0;var a=function(e,t){var r=n.services.backendConnector.state["".concat(e,"|").concat(t)];return-1===r||2===r};return!(t.bindI18n&&t.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!a(n.isLanguageChangingTo,e))&&(!!n.hasResourceBundle(r,e)||(!n.services.backendConnector.backend||!(!a(r,e)||i&&!a(o,e))))}function T(e){return e.displayName||e.name||("string"==typeof e&&e.length>0?e:"Unknown")}function L(e,n){if(!e)return!1;var t=e.props?e.props.children:e.children;return n?t.length>0:!!t}function z(e){return e?e&&e.children?e.children:e.props&&e.props.children:[]}function D(e){return Array.isArray(e)?e:[e]}function B(e,n,i,o,a){if(""===n)return[];var s=o.transKeepBasicHtmlNodesFor||[],u=n&&new RegExp(s.join("|")).test(n);if(!e&&!u)return[n];var l={};!function e(n){D(n).forEach((function(n){"string"!=typeof n&&(L(n)?e(z(n)):"object"!==r(n)||t.isValidElement(n)||Object.assign(l,n))}))}(e);var f=i.services.interpolator.interpolate(n,c(c({},l),a),i.language),p=h("<0>".concat(f,"</0>"));function d(e,n,r){var i=z(e),o=m(i,n.children,r);return function(e){return"[object Array]"===Object.prototype.toString.call(e)&&e.every((function(e){return t.isValidElement(e)}))}(i)&&0===o.length?i:o}function g(e,n,r,i,o){e.dummy&&(e.children=n),r.push(t.cloneElement(e,c(c({},e.props),{},{key:i}),o?void 0:n))}function m(n,i,a){var l=D(n);return D(i).reduce((function(n,i,f){var p,y,h,v=i.children&&i.children[0]&&i.children[0].content;if("tag"===i.type){var b=l[parseInt(i.name,10)];!b&&1===a.length&&a[0][i.name]&&(b=a[0][i.name]),b||(b={});var O=0!==Object.keys(i.attrs).length?(p={props:i.attrs},(h=c({},y=b)).props=Object.assign(p.props,y.props),h):b,w=t.isValidElement(O),j=w&&L(i,!0)&&!i.voidElement,S=u&&"object"===r(O)&&O.dummy&&!w,E="object"===r(e)&&null!==e&&Object.hasOwnProperty.call(e,i.name);if("string"==typeof O)n.push(O);else if(L(O)||j){g(O,d(O,i,a),n,f)}else if(S){var N=m(l,i.children,a);n.push(t.cloneElement(O,c(c({},O.props),{},{key:f}),N))}else if(Number.isNaN(parseFloat(i.name))){if(E)g(O,d(O,i,a),n,f,i.voidElement);else if(o.transSupportBasicHtmlNodes&&s.indexOf(i.name)>-1)if(i.voidElement)n.push(t.createElement(i.name,{key:"".concat(i.name,"-").concat(f)}));else{var x=m(l,i.children,a);n.push(t.createElement(i.name,{key:"".concat(i.name,"-").concat(f)},x))}else if(i.voidElement)n.push("<".concat(i.name," />"));else{var I=m(l,i.children,a);n.push("<".concat(i.name,">").concat(I,"</").concat(i.name,">"))}}else if("object"!==r(O)||w)1===i.children.length&&v?n.push(t.cloneElement(O,c(c({},O.props),{},{key:f}),v)):n.push(t.cloneElement(O,c(c({},O.props),{},{key:f})));else{var k=i.children[0]?v:null;k&&n.push(k)}}else"text"===i.type&&n.push(i.content);return n}),[])}return z(m([{dummy:!0,children:e}],p,D(e||[]))[0])}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.i18n,i=n.useContext(b)||{},o=i.i18n,a=i.defaultNS,s=r||o||E();if(s&&!s.reportNamespaces&&(s.reportNamespaces=new j),!s){R("You will need to pass in an i18next instance by using initReactI18next");var l=function(e){return Array.isArray(e)?e[e.length-1]:e},f=[l,{},!1];return f.t=l,f.i18n={},f.ready=!1,f}s.options.react&&void 0!==s.options.react.wait&&R("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var p=c(c(c({},w()),s.options.react),t),d=p.useSuspense,g=e||a||s.options&&s.options.defaultNS;g="string"==typeof g?[g]:g||["translation"],s.reportNamespaces.addUsedNamespaces&&s.reportNamespaces.addUsedNamespaces(g);var m=(s.isInitialized||s.initializedStoreOnce)&&g.every((function(e){return A(e,s,p)}));function y(){return{t:s.getFixedT(null,"fallback"===p.nsMode?g:g[0])}}var h=n.useState(y()),v=u(h,2),O=v[0],S=v[1],N=n.useRef(!0);n.useEffect((function(){var e=p.bindI18n,n=p.bindI18nStore;function t(){N.current&&S(y())}return N.current=!0,m||d||C(s,g,(function(){N.current&&S(y())})),e&&s&&s.on(e,t),n&&s&&s.store.on(n,t),function(){N.current=!1,e&&s&&e.split(" ").forEach((function(e){return s.off(e,t)})),n&&s&&n.split(" ").forEach((function(e){return s.store.off(e,t)}))}}),[s,g.join()]);var x=n.useRef(!0);n.useEffect((function(){N.current&&!x.current&&S(y()),x.current=!1}),[s]);var I=[O.t,s,m];if(I.t=O.t,I.i18n=s,I.ready=m,m)return I;if(!m&&!d)return I;throw new Promise((function(e){C(s,g,(function(){e()}))}))}function V(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.i18n,o=n.useContext(b)||{},a=o.i18n,c=i||a||E();c.options&&c.options.isClone||(e&&!c.initializedStoreOnce&&(c.services.resourceStore.data=e,c.options.ns=Object.values(e).reduce((function(e,n){return Object.keys(n).forEach((function(n){e.indexOf(n)<0&&e.push(n)})),e}),c.options.ns),c.initializedStoreOnce=!0,c.isInitialized=!0),t&&!c.initializedLanguageOnce&&(c.changeLanguage(t),c.initializedLanguageOnce=!0))}e.I18nContext=b,e.I18nextProvider=function(e){var t=e.i18n,r=e.defaultNS,i=e.children,o=n.useMemo((function(){return{i18n:t,defaultNS:r}}),[t,r]);return n.createElement(b.Provider,{value:o},i)},e.Trans=function(e){var i=e.children,o=e.count,a=e.parent,u=e.i18nKey,l=e.tOptions,f=void 0===l?{}:l,p=e.values,d=e.defaults,g=e.components,m=e.ns,y=e.i18n,h=e.t,v=s(e,["children","count","parent","i18nKey","tOptions","values","defaults","components","ns","i18n","t"]),O=n.useContext(b)||{},j=O.i18n,S=O.defaultNS,N=y||j||E();if(!N)return R("You will need to pass in an i18next instance by using i18nextReactModule"),i;var x=h||N.t.bind(N)||function(e){return e},I=c(c({},w()),N.options&&N.options.react),P=m||x.ns||S||N.options&&N.options.defaultNS;P="string"==typeof P?[P]:P||["translation"];var C=d||function e(n,i){if(!n)return"";var o="",a=D(n),c=i.transKeepBasicHtmlNodesFor||[];return a.forEach((function(n,a){if("string"==typeof n)o+="".concat(n);else if(t.isValidElement(n)){var u=Object.keys(n.props).length,l=c.indexOf(n.type)>-1,f=n.props.children;if(!f&&l&&0===u)o+="<".concat(n.type,"/>");else if(f||l&&0===u)if(n.props.i18nIsDynamicList)o+="<".concat(a,"></").concat(a,">");else if(l&&1===u&&"string"==typeof f)o+="<".concat(n.type,">").concat(f,"</").concat(n.type,">");else{var p=e(f,i);o+="<".concat(a,">").concat(p,"</").concat(a,">")}else o+="<".concat(a,"></").concat(a,">")}else if("object"===r(n)){var d=n.format,g=s(n,["format"]),m=Object.keys(g);if(1===m.length){var y=d?"".concat(m[0],", ").concat(d):m[0];o+="{{".concat(y,"}}")}else k("react-i18next: the passed in object contained more than one variable - the object should look like {{ value, format }} where format is optional.",n)}else k("Trans: the passed in value is invalid - seems you passed in a variable like {number} - please pass in variables for interpolation as full objects like {{number}}.",n)})),o}(i,I)||I.transEmptyNodeValue||u,A=I.hashTransKey,T=u||(A?A(C):C),L=p?f.interpolation:{interpolation:c(c({},f.interpolation),{},{prefix:"#$?",suffix:"?$#"})},z=c(c(c(c({},f),{},{count:o},p),L),{},{defaultValue:C,ns:P}),U=B(g||i,T?x(T,z):C,N,I,z),V=void 0!==a?a:I.defaultTransParent;return V?t.createElement(V,v,U):U},e.Translation=function(e){var n=e.ns,t=e.children,r=u(U(n,s(e,["ns","children"])),3),i=r[0],o=r[1],a=r[2];return t(i,{i18n:o,lng:o.language},a)},e.composeInitialProps=x,e.getDefaults=w,e.getI18n=E,e.getInitialProps=I,e.initReactI18next=N,e.setDefaults=O,e.setI18n=S,e.useSSR=V,e.useTranslation=U,e.withSSR=function(){return function(e){function n(n){var r=n.initialI18nStore,i=n.initialLanguage,o=s(n,["initialI18nStore","initialLanguage"]);return V(r,i),t.createElement(e,c({},o))}return n.getInitialProps=x(e),n.displayName="withI18nextSSR(".concat(T(e),")"),n.WrappedComponent=e,n}},e.withTranslation=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(r){function i(i){var o=i.forwardedRef,a=s(i,["forwardedRef"]),l=u(U(e,a),3),f=l[0],p=l[1],d=l[2],g=c(c({},a),{},{t:f,i18n:p,tReady:d});return n.withRef&&o?g.ref=o:!n.withRef&&o&&(g.forwardedRef=o),t.createElement(r,g)}i.displayName="withI18nextTranslation(".concat(T(r),")"),i.WrappedComponent=r;return n.withRef?t.forwardRef((function(e,n){return t.createElement(i,Object.assign({},e,{forwardedRef:n}))})):i}},Object.defineProperty(e,"__esModule",{value:!0})}));
  