{"ast":null,"code":"import { createElement, forwardRef as forwardRefReact } from 'react';\nimport { useTranslation } from './useTranslation.js';\nimport { getDisplayName } from './utils.js';\nexport function withTranslation(ns) {\n  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return function Extend(WrappedComponent) {\n    function I18nextWithTranslation(_ref) {\n      let {\n        forwardedRef,\n        ...rest\n      } = _ref;\n      const [t, i18n, ready] = useTranslation(ns, {\n        ...rest,\n        keyPrefix: options.keyPrefix\n      });\n      const passDownProps = {\n        ...rest,\n        t,\n        i18n,\n        tReady: ready\n      };\n      if (options.withRef && forwardedRef) {\n        passDownProps.ref = forwardedRef;\n      } else if (!options.withRef && forwardedRef) {\n        passDownProps.forwardedRef = forwardedRef;\n      }\n      return createElement(WrappedComponent, passDownProps);\n    }\n    I18nextWithTranslation.displayName = \"withI18nextTranslation(\".concat(getDisplayName(WrappedComponent), \")\");\n    I18nextWithTranslation.WrappedComponent = WrappedComponent;\n    const forwardRef = (props, ref) => createElement(I18nextWithTranslation, Object.assign({}, props, {\n      forwardedRef: ref\n    }));\n    return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;\n  };\n}","map":{"version":3,"names":["createElement","forwardRef","forwardRefReact","useTranslation","getDisplayName","withTranslation","ns","options","arguments","length","undefined","Extend","WrappedComponent","I18nextWithTranslation","_ref","forwardedRef","rest","t","i18n","ready","keyPrefix","passDownProps","tReady","withRef","ref","displayName","concat","props","Object","assign"],"sources":["/opt/bitnami/minigames/frasle/node_modules/react-i18next/dist/es/withTranslation.js"],"sourcesContent":["import { createElement, forwardRef as forwardRefReact } from 'react';\nimport { useTranslation } from './useTranslation.js';\nimport { getDisplayName } from './utils.js';\nexport function withTranslation(ns) {\n  let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n  return function Extend(WrappedComponent) {\n    function I18nextWithTranslation(_ref) {\n      let {\n        forwardedRef,\n        ...rest\n      } = _ref;\n      const [t, i18n, ready] = useTranslation(ns, {\n        ...rest,\n        keyPrefix: options.keyPrefix\n      });\n      const passDownProps = {\n        ...rest,\n        t,\n        i18n,\n        tReady: ready\n      };\n      if (options.withRef && forwardedRef) {\n        passDownProps.ref = forwardedRef;\n      } else if (!options.withRef && forwardedRef) {\n        passDownProps.forwardedRef = forwardedRef;\n      }\n      return createElement(WrappedComponent, passDownProps);\n    }\n    I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;\n    I18nextWithTranslation.WrappedComponent = WrappedComponent;\n    const forwardRef = (props, ref) => createElement(I18nextWithTranslation, Object.assign({}, props, {\n      forwardedRef: ref\n    }));\n    return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;\n  };\n}"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,IAAIC,eAAe,QAAQ,OAAO;AACpE,SAASC,cAAc,QAAQ,qBAAqB;AACpD,SAASC,cAAc,QAAQ,YAAY;AAC3C,OAAO,SAASC,eAAeA,CAACC,EAAE,EAAE;EAClC,IAAIC,OAAO,GAAGC,SAAS,CAACC,MAAM,GAAG,CAAC,IAAID,SAAS,CAAC,CAAC,CAAC,KAAKE,SAAS,GAAGF,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;EACpF,OAAO,SAASG,MAAMA,CAACC,gBAAgB,EAAE;IACvC,SAASC,sBAAsBA,CAACC,IAAI,EAAE;MACpC,IAAI;QACFC,YAAY;QACZ,GAAGC;MACL,CAAC,GAAGF,IAAI;MACR,MAAM,CAACG,CAAC,EAAEC,IAAI,EAAEC,KAAK,CAAC,GAAGhB,cAAc,CAACG,EAAE,EAAE;QAC1C,GAAGU,IAAI;QACPI,SAAS,EAAEb,OAAO,CAACa;MACrB,CAAC,CAAC;MACF,MAAMC,aAAa,GAAG;QACpB,GAAGL,IAAI;QACPC,CAAC;QACDC,IAAI;QACJI,MAAM,EAAEH;MACV,CAAC;MACD,IAAIZ,OAAO,CAACgB,OAAO,IAAIR,YAAY,EAAE;QACnCM,aAAa,CAAC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