markdown-flow-ui 0.3.6 → 0.3.7
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/_virtual/index8.cjs +1 -1
- package/dist/_virtual/index8.es.js +2 -2
- package/dist/_virtual/index9.cjs +1 -1
- package/dist/_virtual/index9.es.js +2 -2
- package/dist/assets/markdown-flow-ui.css +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs +3 -3
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.cjs.map +1 -1
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js +145 -143
- package/dist/components/MarkdownFlowEditor/plugins/SyntaxHighlighter.es.js.map +1 -1
- package/dist/markdown-flow-ui-lib.css +1 -1
- package/dist/markdown-flow-ui.css +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.cjs +1 -1
- package/dist/node_modules/@braintree/sanitize-url/dist/index.es.js +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +92 -89
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-popper → react-popper}/dist/index.es.js +5 -5
- package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +50 -47
- package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +9 -9
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +10 -7
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +1 -1
- package/dist/node_modules/classnames/index.cjs +1 -1
- package/dist/node_modules/classnames/index.es.js +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.cjs.map +1 -1
- package/dist/node_modules/i18next/dist/esm/i18next.es.js +809 -900
- package/dist/node_modules/i18next/dist/esm/i18next.es.js.map +1 -1
- package/dist/node_modules/katex/dist/katex.cjs +14 -14
- package/dist/node_modules/katex/dist/katex.cjs.map +1 -1
- package/dist/node_modules/katex/dist/katex.es.js +1302 -1192
- package/dist/node_modules/katex/dist/katex.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js +52 -29
- package/dist/node_modules/lucide-react/dist/esm/Icon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/context.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/context.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/context.es.js +6 -0
- package/dist/node_modules/lucide-react/dist/esm/context.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js +13 -16
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js +16 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/captions-off.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js +13 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/captions.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js +8 -2
- package/dist/node_modules/lucide-react/dist/esm/icons/check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js +10 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js +12 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js +14 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/circle-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js +11 -5
- package/dist/node_modules/lucide-react/dist/esm/icons/copy.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js +13 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js +22 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/fast-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js +20 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/file-type.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js +17 -11
- package/dist/node_modules/lucide-react/dist/esm/icons/grip-horizontal.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js +14 -8
- package/dist/node_modules/lucide-react/dist/esm/icons/image.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js +11 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js +15 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/maximize.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js +25 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/rewind.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js +16 -10
- package/dist/node_modules/lucide-react/dist/esm/icons/scan-line.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js +19 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-back.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js +19 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/skip-forward.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js +14 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/square-check.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js +19 -6
- package/dist/node_modules/lucide-react/dist/esm/icons/square-play.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js +15 -9
- package/dist/node_modules/lucide-react/dist/esm/icons/text-cursor-input.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js +13 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/upload.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js +19 -13
- package/dist/node_modules/lucide-react/dist/esm/icons/volume-2.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js +13 -7
- package/dist/node_modules/lucide-react/dist/esm/icons/x.es.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconForReact.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js +44 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/buildLucideIconNode.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/{defaultAttributes.es.js → shared/src/build/defaultAttributes.es.js} +4 -4
- package/dist/node_modules/lucide-react/dist/esm/shared/src/build/defaultAttributes.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/hasA11yProp.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js +5 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toCamelCase.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js +5 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toKebabCase.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toLucideIconData.es.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils/toPascalCase.es.js.map +1 -0
- package/dist/node_modules/micromark/lib/create-tokenizer.cjs +3 -3
- package/dist/node_modules/micromark/lib/create-tokenizer.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/create-tokenizer.es.js +78 -76
- package/dist/node_modules/micromark/lib/create-tokenizer.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.cjs +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/document.es.js +77 -75
- package/dist/node_modules/micromark/lib/initialize/document.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.cjs +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/initialize/text.es.js +67 -64
- package/dist/node_modules/micromark/lib/initialize/text.es.js.map +1 -1
- package/dist/node_modules/micromark/lib/preprocess.cjs +1 -1
- package/dist/node_modules/micromark/lib/preprocess.cjs.map +1 -1
- package/dist/node_modules/micromark/lib/preprocess.es.js +19 -14
- package/dist/node_modules/micromark/lib/preprocess.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js +36 -32
- package/dist/node_modules/micromark-core-commonmark/lib/attention.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js +49 -61
- package/dist/node_modules/micromark-core-commonmark/lib/code-fenced.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js +21 -27
- package/dist/node_modules/micromark-core-commonmark/lib/code-indented.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js +18 -14
- package/dist/node_modules/micromark-core-commonmark/lib/heading-atx.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js +59 -71
- package/dist/node_modules/micromark-core-commonmark/lib/html-flow.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js +87 -85
- package/dist/node_modules/micromark-core-commonmark/lib/label-end.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js +11 -10
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-image.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js +12 -11
- package/dist/node_modules/micromark-core-commonmark/lib/label-start-link.es.js.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs +2 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.cjs.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js +18 -0
- package/dist/node_modules/micromark-core-commonmark/lib/partial-non-lazy-continuation.es.js.map +1 -0
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.cjs.map +1 -1
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js +35 -33
- package/dist/node_modules/micromark-core-commonmark/lib/setext-underline.es.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.cjs.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js +32 -28
- package/dist/node_modules/micromark-extension-gfm-table/lib/edit-map.es.js.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.cjs.map +1 -1
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js +18 -14
- package/dist/node_modules/micromark-extension-gfm-table/lib/syntax.es.js.map +1 -1
- package/dist/node_modules/micromark-factory-space/index.cjs +1 -1
- package/dist/node_modules/micromark-factory-space/index.cjs.map +1 -1
- package/dist/node_modules/micromark-factory-space/index.es.js +24 -10
- package/dist/node_modules/micromark-factory-space/index.es.js.map +1 -1
- package/dist/node_modules/micromark-util-edit-map/index.cjs +2 -0
- package/dist/node_modules/micromark-util-edit-map/index.cjs.map +1 -0
- package/dist/node_modules/micromark-util-edit-map/index.es.js +83 -0
- package/dist/node_modules/micromark-util-edit-map/index.es.js.map +1 -0
- package/package.json +24 -17
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js +0 -50
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js +0 -82
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-context/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +0 -216
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +0 -105
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-popper/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js +0 -18
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-portal/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js +0 -16
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-callback-ref/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js +0 -70
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-use-controllable-state/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js +0 -39
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs +0 -2
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.cjs.map +0 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js +0 -99
- package/dist/node_modules/@radix-ui/react-visually-hidden/node_modules/@radix-ui/react-slot/dist/index.es.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.es.js.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +0 -2
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +0 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js +0 -19
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.es.js.map +0 -1
- /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.cjs +0 -0
- /package/dist/node_modules/@radix-ui/{react-tooltip/node_modules/@radix-ui/react-arrow → react-arrow}/dist/index.es.js +0 -0
|
@@ -1,69 +1,67 @@
|
|
|
1
|
-
const d = (
|
|
2
|
-
let
|
|
1
|
+
const d = (o) => typeof o == "string", H = () => {
|
|
2
|
+
let o, e;
|
|
3
3
|
const t = new Promise((s, i) => {
|
|
4
|
-
|
|
4
|
+
o = s, e = i;
|
|
5
5
|
});
|
|
6
|
-
return t.resolve =
|
|
7
|
-
},
|
|
8
|
-
|
|
6
|
+
return t.resolve = o, t.reject = e, t;
|
|
7
|
+
}, z = (o) => o == null ? "" : String(o), Le = (o, e, t) => {
|
|
8
|
+
o.forEach((s) => {
|
|
9
9
|
e[s] && (t[s] = e[s]);
|
|
10
10
|
});
|
|
11
|
-
},
|
|
11
|
+
}, be = /###/g, ie = (o) => o && o.includes("###") ? o.replace(be, ".") : o, ne = (o) => !o || d(o), U = (o, e, t) => {
|
|
12
12
|
const s = d(e) ? e.split(".") : e;
|
|
13
13
|
let i = 0;
|
|
14
14
|
for (; i < s.length - 1; ) {
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
!n
|
|
15
|
+
if (ne(o)) return {};
|
|
16
|
+
const n = ie(s[i]);
|
|
17
|
+
!o[n] && t && (o[n] = new t()), Object.prototype.hasOwnProperty.call(o, n) ? o = o[n] : o = {}, ++i;
|
|
18
18
|
}
|
|
19
|
-
return
|
|
20
|
-
obj:
|
|
21
|
-
k:
|
|
19
|
+
return ne(o) ? {} : {
|
|
20
|
+
obj: o,
|
|
21
|
+
k: ie(s[i])
|
|
22
22
|
};
|
|
23
|
-
},
|
|
23
|
+
}, re = (o, e, t) => {
|
|
24
24
|
const {
|
|
25
25
|
obj: s,
|
|
26
26
|
k: i
|
|
27
|
-
} =
|
|
27
|
+
} = U(o, e, Object);
|
|
28
28
|
if (s !== void 0 || e.length === 1) {
|
|
29
29
|
s[i] = t;
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
|
-
let
|
|
33
|
-
for (;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
32
|
+
let n = e[e.length - 1], r = e.slice(0, e.length - 1), a = U(o, r, Object);
|
|
33
|
+
for (; a.obj === void 0 && r.length; )
|
|
34
|
+
n = `${r[r.length - 1]}.${n}`, r = r.slice(0, r.length - 1), a = U(o, r, Object), a?.obj && typeof a.obj[`${a.k}.${n}`] < "u" && (a.obj = void 0);
|
|
35
|
+
a.obj[`${a.k}.${n}`] = t;
|
|
36
|
+
}, ve = (o, e, t, s) => {
|
|
37
37
|
const {
|
|
38
38
|
obj: i,
|
|
39
|
-
k:
|
|
40
|
-
} =
|
|
41
|
-
i[
|
|
42
|
-
},
|
|
39
|
+
k: n
|
|
40
|
+
} = U(o, e, Object);
|
|
41
|
+
i[n] = i[n] || [], i[n].push(t);
|
|
42
|
+
}, _ = (o, e) => {
|
|
43
43
|
const {
|
|
44
44
|
obj: t,
|
|
45
45
|
k: s
|
|
46
|
-
} =
|
|
47
|
-
if (t)
|
|
46
|
+
} = U(o, e);
|
|
47
|
+
if (t && Object.prototype.hasOwnProperty.call(t, s))
|
|
48
48
|
return t[s];
|
|
49
|
-
},
|
|
50
|
-
const s =
|
|
51
|
-
return s !== void 0 ? s :
|
|
52
|
-
},
|
|
49
|
+
}, Oe = (o, e, t) => {
|
|
50
|
+
const s = _(o, t);
|
|
51
|
+
return s !== void 0 ? s : _(e, t);
|
|
52
|
+
}, ge = (o, e, t) => {
|
|
53
53
|
for (const s in e)
|
|
54
|
-
s !== "__proto__" && s !== "constructor" && (s
|
|
55
|
-
return
|
|
56
|
-
},
|
|
57
|
-
var xe = {
|
|
54
|
+
s !== "__proto__" && s !== "constructor" && (Object.prototype.hasOwnProperty.call(o, s) ? d(o[s]) || o[s] instanceof String || d(e[s]) || e[s] instanceof String ? t && (o[s] = e[s]) : ge(o[s], e[s], t) : o[s] = e[s]);
|
|
55
|
+
return o;
|
|
56
|
+
}, j = (o) => o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"), we = {
|
|
58
57
|
"&": "&",
|
|
59
58
|
"<": "<",
|
|
60
59
|
">": ">",
|
|
61
60
|
'"': """,
|
|
62
61
|
"'": "'",
|
|
63
62
|
"/": "/"
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
class ye {
|
|
63
|
+
}, Ce = (o) => d(o) ? o.replace(/[&<>"'\/]/g, (e) => we[e]) : o;
|
|
64
|
+
class Re {
|
|
67
65
|
constructor(e) {
|
|
68
66
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
69
67
|
}
|
|
@@ -75,96 +73,86 @@ class ye {
|
|
|
75
73
|
return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
|
|
76
74
|
}
|
|
77
75
|
}
|
|
78
|
-
const
|
|
76
|
+
const $e = [" ", ",", "?", "!", ";"], Pe = new Re(20), Ne = (o, e, t) => {
|
|
79
77
|
e = e || "", t = t || "";
|
|
80
|
-
const s =
|
|
78
|
+
const s = $e.filter((r) => !e.includes(r) && !t.includes(r));
|
|
81
79
|
if (s.length === 0) return !0;
|
|
82
|
-
const i =
|
|
83
|
-
let
|
|
84
|
-
if (!
|
|
85
|
-
const
|
|
86
|
-
|
|
87
|
-
}
|
|
88
|
-
return
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
if (
|
|
92
|
-
|
|
80
|
+
const i = Pe.getRegExp(`(${s.map((r) => r === "?" ? "\\?" : r).join("|")})`);
|
|
81
|
+
let n = !i.test(o);
|
|
82
|
+
if (!n) {
|
|
83
|
+
const r = o.indexOf(t);
|
|
84
|
+
r > 0 && !i.test(o.substring(0, r)) && (n = !0);
|
|
85
|
+
}
|
|
86
|
+
return n;
|
|
87
|
+
}, X = (o, e, t = ".") => {
|
|
88
|
+
if (!o) return;
|
|
89
|
+
if (o[e])
|
|
90
|
+
return Object.prototype.hasOwnProperty.call(o, e) ? o[e] : void 0;
|
|
93
91
|
const s = e.split(t);
|
|
94
|
-
let i =
|
|
95
|
-
for (let
|
|
92
|
+
let i = o;
|
|
93
|
+
for (let n = 0; n < s.length; ) {
|
|
96
94
|
if (!i || typeof i != "object")
|
|
97
95
|
return;
|
|
98
|
-
let
|
|
99
|
-
for (let
|
|
100
|
-
if (
|
|
101
|
-
if (["string", "number", "boolean"].
|
|
96
|
+
let r, a = "";
|
|
97
|
+
for (let u = n; u < s.length; ++u)
|
|
98
|
+
if (u !== n && (a += t), a += s[u], r = i[a], (typeof r == "function" || a === "__proto__") && !Object.prototype.hasOwnProperty.call(i, a) && (r = void 0), r !== void 0) {
|
|
99
|
+
if (["string", "number", "boolean"].includes(typeof r) && u < s.length - 1)
|
|
102
100
|
continue;
|
|
103
|
-
|
|
101
|
+
n += u - n + 1;
|
|
104
102
|
break;
|
|
105
103
|
}
|
|
106
|
-
i =
|
|
104
|
+
i = r;
|
|
107
105
|
}
|
|
108
106
|
return i;
|
|
109
|
-
},
|
|
107
|
+
}, A = (o) => o?.replace(/_/g, "-"), Fe = {
|
|
110
108
|
type: "logger",
|
|
111
|
-
log(
|
|
112
|
-
this.output("log",
|
|
109
|
+
log(o) {
|
|
110
|
+
this.output("log", o);
|
|
113
111
|
},
|
|
114
|
-
warn(
|
|
115
|
-
this.output("warn",
|
|
112
|
+
warn(o) {
|
|
113
|
+
this.output("warn", o);
|
|
116
114
|
},
|
|
117
|
-
error(
|
|
118
|
-
this.output("error",
|
|
115
|
+
error(o) {
|
|
116
|
+
this.output("error", o);
|
|
119
117
|
},
|
|
120
|
-
output(
|
|
121
|
-
console
|
|
118
|
+
output(o, e) {
|
|
119
|
+
console?.[o]?.apply?.(console, e);
|
|
122
120
|
}
|
|
123
121
|
};
|
|
124
|
-
class
|
|
125
|
-
constructor(e) {
|
|
126
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
122
|
+
class W {
|
|
123
|
+
constructor(e, t = {}) {
|
|
127
124
|
this.init(e, t);
|
|
128
125
|
}
|
|
129
|
-
init(e) {
|
|
130
|
-
|
|
131
|
-
this.prefix = t.prefix || "i18next:", this.logger = e || ve, this.options = t, this.debug = t.debug;
|
|
126
|
+
init(e, t = {}) {
|
|
127
|
+
this.prefix = t.prefix || "i18next:", this.logger = e || Fe, this.options = t, this.debug = t.debug;
|
|
132
128
|
}
|
|
133
|
-
log() {
|
|
134
|
-
|
|
135
|
-
t[s] = arguments[s];
|
|
136
|
-
return this.forward(t, "log", "", !0);
|
|
129
|
+
log(...e) {
|
|
130
|
+
return this.forward(e, "log", "", !0);
|
|
137
131
|
}
|
|
138
|
-
warn() {
|
|
139
|
-
|
|
140
|
-
t[s] = arguments[s];
|
|
141
|
-
return this.forward(t, "warn", "", !0);
|
|
132
|
+
warn(...e) {
|
|
133
|
+
return this.forward(e, "warn", "", !0);
|
|
142
134
|
}
|
|
143
|
-
error() {
|
|
144
|
-
|
|
145
|
-
t[s] = arguments[s];
|
|
146
|
-
return this.forward(t, "error", "");
|
|
135
|
+
error(...e) {
|
|
136
|
+
return this.forward(e, "error", "");
|
|
147
137
|
}
|
|
148
|
-
deprecate() {
|
|
149
|
-
|
|
150
|
-
t[s] = arguments[s];
|
|
151
|
-
return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
|
|
138
|
+
deprecate(...e) {
|
|
139
|
+
return this.forward(e, "warn", "WARNING DEPRECATED: ", !0);
|
|
152
140
|
}
|
|
153
141
|
forward(e, t, s, i) {
|
|
154
|
-
return i && !this.debug ? null : (d(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
142
|
+
return i && !this.debug ? null : (e = e.map((n) => d(n) ? n.replace(/[\r\n\x00-\x1F\x7F]/g, " ") : n), d(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
155
143
|
}
|
|
156
144
|
create(e) {
|
|
157
|
-
return new
|
|
145
|
+
return new W(this.logger, {
|
|
158
146
|
prefix: `${this.prefix}:${e}:`,
|
|
159
147
|
...this.options
|
|
160
148
|
});
|
|
161
149
|
}
|
|
162
150
|
clone(e) {
|
|
163
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
151
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new W(this.logger, e);
|
|
164
152
|
}
|
|
165
153
|
}
|
|
166
|
-
var
|
|
167
|
-
class
|
|
154
|
+
var F = new W();
|
|
155
|
+
class Q {
|
|
168
156
|
constructor() {
|
|
169
157
|
this.observers = {};
|
|
170
158
|
}
|
|
@@ -184,72 +172,71 @@ class B {
|
|
|
184
172
|
this.observers[e].delete(t);
|
|
185
173
|
}
|
|
186
174
|
}
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
let
|
|
196
|
-
|
|
197
|
-
|
|
175
|
+
once(e, t) {
|
|
176
|
+
const s = (...i) => {
|
|
177
|
+
t(...i), this.off(e, s);
|
|
178
|
+
};
|
|
179
|
+
return this.on(e, s), this;
|
|
180
|
+
}
|
|
181
|
+
emit(e, ...t) {
|
|
182
|
+
this.observers[e] && Array.from(this.observers[e].entries()).forEach(([i, n]) => {
|
|
183
|
+
for (let r = 0; r < n; r++)
|
|
184
|
+
i(...t);
|
|
185
|
+
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach(([i, n]) => {
|
|
186
|
+
for (let r = 0; r < n; r++)
|
|
187
|
+
i(e, ...t);
|
|
198
188
|
});
|
|
199
189
|
}
|
|
200
190
|
}
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
191
|
+
const ae = /* @__PURE__ */ new WeakSet();
|
|
192
|
+
class oe extends Q {
|
|
193
|
+
constructor(e, t = {
|
|
194
|
+
ns: ["translation"],
|
|
195
|
+
defaultNS: "translation"
|
|
196
|
+
}) {
|
|
207
197
|
super(), this.data = e || {}, this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.options.ignoreJSONStructure === void 0 && (this.options.ignoreJSONStructure = !0);
|
|
208
198
|
}
|
|
209
199
|
addNamespaces(e) {
|
|
210
|
-
this.options.ns.
|
|
200
|
+
this.options.ns.includes(e) || this.options.ns.push(e);
|
|
211
201
|
}
|
|
212
202
|
removeNamespaces(e) {
|
|
213
203
|
const t = this.options.ns.indexOf(e);
|
|
214
204
|
t > -1 && this.options.ns.splice(t, 1);
|
|
215
205
|
}
|
|
216
|
-
getResource(e, t, s) {
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
for (const r in s)
|
|
237
|
-
(d(s[r]) || Array.isArray(s[r])) && this.addResource(e, t, r, s[r], {
|
|
206
|
+
getResource(e, t, s, i = {}) {
|
|
207
|
+
const n = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, r = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
208
|
+
let a;
|
|
209
|
+
e.includes(".") ? a = e.split(".") : (a = [e, t], s && (Array.isArray(s) ? a.push(...s) : d(s) && n ? a.push(...s.split(n)) : a.push(s)));
|
|
210
|
+
const u = _(this.data, a);
|
|
211
|
+
return u == null && !t && !s && e.includes(".") && (e = a[0], t = a[1], s = a.slice(2).join(".")), u != null || !r || !d(s) ? u : X(this.data?.[e]?.[t], s, n);
|
|
212
|
+
}
|
|
213
|
+
addResource(e, t, s, i, n = {
|
|
214
|
+
silent: !1
|
|
215
|
+
}) {
|
|
216
|
+
const r = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator;
|
|
217
|
+
let a = [e, t];
|
|
218
|
+
s && (a = a.concat(r ? s.split(r) : s)), e.includes(".") && (a = e.split("."), i = t, t = a[1]), this.addNamespaces(t), re(this.data, a, i), n.silent || this.emit("added", e, t, s, i);
|
|
219
|
+
}
|
|
220
|
+
addResources(e, t, s, i = {
|
|
221
|
+
silent: !1
|
|
222
|
+
}) {
|
|
223
|
+
for (const n in s)
|
|
224
|
+
(d(s[n]) || Array.isArray(s[n])) && this.addResource(e, t, n, s[n], {
|
|
238
225
|
silent: !0
|
|
239
226
|
});
|
|
240
227
|
i.silent || this.emit("added", e, t, s);
|
|
241
228
|
}
|
|
242
|
-
addResourceBundle(e, t, s, i, r
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
e.
|
|
248
|
-
let
|
|
249
|
-
|
|
250
|
-
...
|
|
229
|
+
addResourceBundle(e, t, s, i, n, r = {
|
|
230
|
+
silent: !1,
|
|
231
|
+
skipCopy: !1
|
|
232
|
+
}) {
|
|
233
|
+
let a = [e, t];
|
|
234
|
+
e.includes(".") && (a = e.split("."), i = s, s = t, t = a[1]), this.addNamespaces(t);
|
|
235
|
+
let u = _(this.data, a) || {};
|
|
236
|
+
r.skipCopy || (s = JSON.parse(JSON.stringify(s))), i ? ge(u, s, n) : u = {
|
|
237
|
+
...u,
|
|
251
238
|
...s
|
|
252
|
-
},
|
|
239
|
+
}, re(this.data, a, u), r.silent || this.emit("added", e, t, s);
|
|
253
240
|
}
|
|
254
241
|
removeResourceBundle(e, t) {
|
|
255
242
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -258,167 +245,200 @@ class se extends B {
|
|
|
258
245
|
return this.getResource(e, t) !== void 0;
|
|
259
246
|
}
|
|
260
247
|
getResourceBundle(e, t) {
|
|
261
|
-
return t || (t = this.options.defaultNS), this.
|
|
262
|
-
...this.getResource(e, t)
|
|
263
|
-
} : this.getResource(e, t);
|
|
248
|
+
return t || (t = this.options.defaultNS), this.getResource(e, t);
|
|
264
249
|
}
|
|
265
250
|
getDataByLanguage(e) {
|
|
266
251
|
return this.data[e];
|
|
267
252
|
}
|
|
268
253
|
hasLanguageSomeTranslations(e) {
|
|
269
254
|
const t = this.getDataByLanguage(e);
|
|
270
|
-
return !!(t && Object.keys(t) || []).find((i) =>
|
|
255
|
+
return !!(t && Object.keys(t) || []).find((i) => {
|
|
256
|
+
const n = t[i];
|
|
257
|
+
return ae.has(n) ? !0 : !n || Object.keys(n).length === 0 ? !1 : (typeof n == "object" && ae.add(n), !0);
|
|
258
|
+
});
|
|
271
259
|
}
|
|
272
260
|
toJSON() {
|
|
273
261
|
return this.data;
|
|
274
262
|
}
|
|
275
263
|
}
|
|
276
|
-
var
|
|
264
|
+
var me = {
|
|
277
265
|
processors: {},
|
|
278
|
-
addPostProcessor(
|
|
279
|
-
this.processors[
|
|
266
|
+
addPostProcessor(o) {
|
|
267
|
+
this.processors[o.name] = o;
|
|
280
268
|
},
|
|
281
|
-
handle(
|
|
282
|
-
return
|
|
283
|
-
|
|
269
|
+
handle(o, e, t, s, i) {
|
|
270
|
+
return o.forEach((n) => {
|
|
271
|
+
e = this.processors[n]?.process(e, t, s, i) ?? e;
|
|
284
272
|
}), e;
|
|
285
273
|
}
|
|
286
274
|
};
|
|
287
|
-
const
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
275
|
+
const ye = /* @__PURE__ */ Symbol("i18next/PATH_KEY");
|
|
276
|
+
function je() {
|
|
277
|
+
const o = [], e = /* @__PURE__ */ Object.create(null);
|
|
278
|
+
let t;
|
|
279
|
+
return e.get = (s, i) => (t?.revoke?.(), i === ye ? o : (o.push(i), t = Proxy.revocable(s, e), t.proxy)), Proxy.revocable(/* @__PURE__ */ Object.create(null), e).proxy;
|
|
280
|
+
}
|
|
281
|
+
function V(o, e) {
|
|
282
|
+
const {
|
|
283
|
+
[ye]: t
|
|
284
|
+
} = o(je()), s = e?.keySeparator ?? ".", i = e?.nsSeparator ?? ":", n = e?.enableSelector === "strict";
|
|
285
|
+
if (t.length > 1 && i) {
|
|
286
|
+
const r = e?.ns, a = n ? Array.isArray(r) ? r : r ? [r] : null : Array.isArray(r) ? r : null;
|
|
287
|
+
if (a && (n ? a : a.length > 1 ? a.slice(1) : []).includes(t[0]))
|
|
288
|
+
return `${t[0]}${i}${t.slice(1).join(s)}`;
|
|
289
|
+
}
|
|
290
|
+
return t.join(s);
|
|
291
|
+
}
|
|
292
|
+
const G = (o) => !d(o) && typeof o != "boolean" && typeof o != "number";
|
|
293
|
+
class Y extends Q {
|
|
294
|
+
constructor(e, t = {}) {
|
|
295
|
+
super(), Le(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = F.create("translator"), this.checkedLoadedFor = {};
|
|
292
296
|
}
|
|
293
297
|
changeLanguage(e) {
|
|
294
298
|
e && (this.language = e);
|
|
295
299
|
}
|
|
296
|
-
exists(e
|
|
297
|
-
|
|
298
|
-
|
|
300
|
+
exists(e, t = {
|
|
301
|
+
interpolation: {}
|
|
302
|
+
}) {
|
|
303
|
+
const s = {
|
|
304
|
+
...t
|
|
299
305
|
};
|
|
300
|
-
if (e == null)
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
306
|
+
if (e == null) return !1;
|
|
307
|
+
const i = this.resolve(e, s);
|
|
308
|
+
if (i?.res === void 0) return !1;
|
|
309
|
+
const n = G(i.res);
|
|
310
|
+
return !(s.returnObjects === !1 && n);
|
|
304
311
|
}
|
|
305
312
|
extractFromKey(e, t) {
|
|
306
313
|
let s = t.nsSeparator !== void 0 ? t.nsSeparator : this.options.nsSeparator;
|
|
307
314
|
s === void 0 && (s = ":");
|
|
308
315
|
const i = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
|
|
309
|
-
let
|
|
310
|
-
const
|
|
311
|
-
if (
|
|
312
|
-
const
|
|
313
|
-
if (
|
|
316
|
+
let n = t.ns || this.options.defaultNS || [];
|
|
317
|
+
const r = s && e.includes(s), a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ne(e, s, i);
|
|
318
|
+
if (r && !a) {
|
|
319
|
+
const u = e.match(this.interpolator.nestingRegexp);
|
|
320
|
+
if (u && u.length > 0)
|
|
314
321
|
return {
|
|
315
322
|
key: e,
|
|
316
|
-
namespaces: d(
|
|
323
|
+
namespaces: d(n) ? [n] : n
|
|
317
324
|
};
|
|
318
|
-
const
|
|
319
|
-
(s !== i || s === i && this.options.ns.
|
|
325
|
+
const l = e.split(s);
|
|
326
|
+
(s !== i || s === i && this.options.ns.includes(l[0])) && (n = l.shift()), e = l.join(i);
|
|
320
327
|
}
|
|
321
328
|
return {
|
|
322
329
|
key: e,
|
|
323
|
-
namespaces: d(
|
|
330
|
+
namespaces: d(n) ? [n] : n
|
|
324
331
|
};
|
|
325
332
|
}
|
|
326
333
|
translate(e, t, s) {
|
|
327
|
-
|
|
334
|
+
let i = typeof t == "object" ? {
|
|
328
335
|
...t
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
|
|
336
|
+
} : t;
|
|
337
|
+
if (typeof i != "object" && this.options.overloadTranslationOptionHandler && (i = this.options.overloadTranslationOptionHandler(arguments)), typeof i == "object" && (i = {
|
|
338
|
+
...i
|
|
339
|
+
}), i || (i = {}), e == null) return "";
|
|
340
|
+
typeof e == "function" && (e = V(e, {
|
|
341
|
+
...this.options,
|
|
342
|
+
...i
|
|
343
|
+
})), Array.isArray(e) || (e = [String(e)]), e = e.map((v) => typeof v == "function" ? V(v, {
|
|
344
|
+
...this.options,
|
|
345
|
+
...i
|
|
346
|
+
}) : String(v));
|
|
347
|
+
const n = i.returnDetails !== void 0 ? i.returnDetails : this.options.returnDetails, r = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, {
|
|
332
348
|
key: a,
|
|
333
|
-
namespaces:
|
|
334
|
-
} = this.extractFromKey(e[e.length - 1],
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
}
|
|
347
|
-
return i ? {
|
|
349
|
+
namespaces: u
|
|
350
|
+
} = this.extractFromKey(e[e.length - 1], i), l = u[u.length - 1];
|
|
351
|
+
let c = i.nsSeparator !== void 0 ? i.nsSeparator : this.options.nsSeparator;
|
|
352
|
+
c === void 0 && (c = ":");
|
|
353
|
+
const h = i.lng || this.language, f = i.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
354
|
+
if (h?.toLowerCase() === "cimode")
|
|
355
|
+
return f ? n ? {
|
|
356
|
+
res: `${l}${c}${a}`,
|
|
357
|
+
usedKey: a,
|
|
358
|
+
exactUsedKey: a,
|
|
359
|
+
usedLng: h,
|
|
360
|
+
usedNS: l,
|
|
361
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
362
|
+
} : `${l}${c}${a}` : n ? {
|
|
348
363
|
res: a,
|
|
349
364
|
usedKey: a,
|
|
350
365
|
exactUsedKey: a,
|
|
351
|
-
usedLng:
|
|
366
|
+
usedLng: h,
|
|
352
367
|
usedNS: l,
|
|
353
|
-
usedParams: this.getUsedParamsDetails(
|
|
368
|
+
usedParams: this.getUsedParamsDetails(i)
|
|
354
369
|
} : a;
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
370
|
+
const g = this.resolve(e, i);
|
|
371
|
+
let p = g?.res;
|
|
372
|
+
const m = g?.usedKey || a, S = g?.exactUsedKey || a, L = ["[object Number]", "[object Function]", "[object RegExp]"], y = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, b = !this.i18nFormat || this.i18nFormat.handleAsObject, x = i.count !== void 0 && !d(i.count), R = Y.hasDefaultValue(i), T = x ? this.pluralResolver.getSuffix(h, i.count, i) : "", I = i.ordinal && x ? this.pluralResolver.getSuffix(h, i.count, {
|
|
373
|
+
ordinal: !1
|
|
374
|
+
}) : "", q = x && !i.ordinal && i.count === 0, k = q && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${T}`] || i[`defaultValue${I}`] || i.defaultValue;
|
|
375
|
+
let $ = p;
|
|
376
|
+
b && !p && R && ($ = k);
|
|
377
|
+
const xe = G($), Se = Object.prototype.toString.apply($);
|
|
378
|
+
if (b && $ && xe && !L.includes(Se) && !(d(y) && Array.isArray($))) {
|
|
379
|
+
if (!i.returnObjects && !this.options.returnObjects) {
|
|
361
380
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
362
|
-
const
|
|
363
|
-
...
|
|
364
|
-
ns:
|
|
381
|
+
const v = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(m, $, {
|
|
382
|
+
...i,
|
|
383
|
+
ns: u
|
|
365
384
|
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
366
|
-
return
|
|
385
|
+
return n ? (g.res = v, g.usedParams = this.getUsedParamsDetails(i), g) : v;
|
|
367
386
|
}
|
|
368
387
|
if (r) {
|
|
369
|
-
const
|
|
370
|
-
for (const
|
|
371
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
...
|
|
388
|
+
const v = Array.isArray($), C = v ? [] : {}, ee = v ? S : m;
|
|
389
|
+
for (const P in $)
|
|
390
|
+
if (Object.prototype.hasOwnProperty.call($, P)) {
|
|
391
|
+
const N = `${ee}${r}${P}`;
|
|
392
|
+
R && !p ? C[P] = this.translate(N, {
|
|
393
|
+
...i,
|
|
394
|
+
defaultValue: G(k) ? k[P] : void 0,
|
|
395
|
+
joinArrays: !1,
|
|
396
|
+
ns: u
|
|
397
|
+
}) : C[P] = this.translate(N, {
|
|
398
|
+
...i,
|
|
375
399
|
joinArrays: !1,
|
|
376
|
-
ns:
|
|
377
|
-
}),
|
|
400
|
+
ns: u
|
|
401
|
+
}), C[P] === N && (C[P] = $[P]);
|
|
378
402
|
}
|
|
379
|
-
|
|
403
|
+
p = C;
|
|
380
404
|
}
|
|
381
|
-
} else if (
|
|
382
|
-
|
|
405
|
+
} else if (b && d(y) && Array.isArray(p))
|
|
406
|
+
p = p.join(y), p && (p = this.extendTranslation(p, e, i, g, s));
|
|
383
407
|
else {
|
|
384
|
-
let
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
const ge = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && v ? void 0 : u, F = S && E !== u && this.options.updateMissing;
|
|
390
|
-
if (v || b || F) {
|
|
391
|
-
if (this.logger.log(F ? "updateKey" : "missingKey", f, l, a, F ? E : u), r) {
|
|
408
|
+
let v = !1, C = !1;
|
|
409
|
+
!this.isValidLookup(p) && R && (v = !0, p = k), this.isValidLookup(p) || (C = !0, p = a);
|
|
410
|
+
const P = (i.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && C ? void 0 : p, N = R && k !== p && this.options.updateMissing;
|
|
411
|
+
if (C || v || N) {
|
|
412
|
+
if (this.logger.log(N ? "updateKey" : "missingKey", h, l, x && !N ? `${a}${this.pluralResolver.getSuffix(h, i.count, i)}` : a, N ? k : p), r) {
|
|
392
413
|
const w = this.resolve(a, {
|
|
393
|
-
...
|
|
414
|
+
...i,
|
|
394
415
|
keySeparator: !1
|
|
395
416
|
});
|
|
396
417
|
w && w.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.");
|
|
397
418
|
}
|
|
398
|
-
let
|
|
399
|
-
const
|
|
400
|
-
if (this.options.saveMissingTo === "fallback" &&
|
|
401
|
-
for (let w = 0; w <
|
|
402
|
-
|
|
403
|
-
else this.options.saveMissingTo === "all" ?
|
|
404
|
-
const
|
|
405
|
-
const
|
|
406
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(w, l,
|
|
419
|
+
let K = [];
|
|
420
|
+
const B = this.languageUtils.getFallbackCodes(this.options.fallbackLng, i.lng || this.language);
|
|
421
|
+
if (this.options.saveMissingTo === "fallback" && B && B[0])
|
|
422
|
+
for (let w = 0; w < B.length; w++)
|
|
423
|
+
K.push(B[w]);
|
|
424
|
+
else this.options.saveMissingTo === "all" ? K = this.languageUtils.toResolveHierarchy(i.lng || this.language) : K.push(i.lng || this.language);
|
|
425
|
+
const te = (w, E, D) => {
|
|
426
|
+
const se = R && D !== p ? D : P;
|
|
427
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(w, l, E, se, N, i) : this.backendConnector?.saveMissing && this.backendConnector.saveMissing(w, l, E, se, N, i), this.emit("missingKey", w, l, E, p);
|
|
407
428
|
};
|
|
408
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
409
|
-
const
|
|
410
|
-
|
|
411
|
-
|
|
429
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && x ? K.forEach((w) => {
|
|
430
|
+
const E = this.pluralResolver.getSuffixes(w, i);
|
|
431
|
+
q && i[`defaultValue${this.options.pluralSeparator}zero`] && !E.includes(`${this.options.pluralSeparator}zero`) && E.push(`${this.options.pluralSeparator}zero`), E.forEach((D) => {
|
|
432
|
+
te([w], a + D, i[`defaultValue${D}`] || k);
|
|
412
433
|
});
|
|
413
|
-
}) :
|
|
434
|
+
}) : te(K, a, k));
|
|
414
435
|
}
|
|
415
|
-
|
|
436
|
+
p = this.extendTranslation(p, e, i, g, s), C && p === a && this.options.appendNamespaceToMissingKey && (p = `${l}${c}${a}`), (C || v) && this.options.parseMissingKeyHandler && (p = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${l}${c}${a}` : a, v ? p : void 0, i));
|
|
416
437
|
}
|
|
417
|
-
return
|
|
438
|
+
return n ? (g.res = p, g.usedParams = this.getUsedParamsDetails(i), g) : p;
|
|
418
439
|
}
|
|
419
|
-
extendTranslation(e, t, s, i,
|
|
420
|
-
|
|
421
|
-
if (this.i18nFormat && this.i18nFormat.parse)
|
|
440
|
+
extendTranslation(e, t, s, i, n) {
|
|
441
|
+
if (this.i18nFormat?.parse)
|
|
422
442
|
e = this.i18nFormat.parse(e, {
|
|
423
443
|
...this.options.interpolation.defaultVariables,
|
|
424
444
|
...s
|
|
@@ -433,28 +453,24 @@ class J extends B {
|
|
|
433
453
|
...s.interpolation
|
|
434
454
|
}
|
|
435
455
|
});
|
|
436
|
-
const
|
|
437
|
-
let
|
|
438
|
-
if (
|
|
439
|
-
const
|
|
440
|
-
|
|
456
|
+
const u = d(e) && (s?.interpolation?.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
457
|
+
let l;
|
|
458
|
+
if (u) {
|
|
459
|
+
const h = e.match(this.interpolator.nestingRegexp);
|
|
460
|
+
l = h && h.length;
|
|
441
461
|
}
|
|
442
|
-
let
|
|
443
|
-
if (this.options.interpolation.defaultVariables && (
|
|
462
|
+
let c = s.replace && !d(s.replace) ? s.replace : s;
|
|
463
|
+
if (this.options.interpolation.defaultVariables && (c = {
|
|
444
464
|
...this.options.interpolation.defaultVariables,
|
|
445
|
-
...
|
|
446
|
-
}), e = this.interpolator.interpolate(e,
|
|
447
|
-
const
|
|
448
|
-
|
|
465
|
+
...c
|
|
466
|
+
}), e = this.interpolator.interpolate(e, c, s.lng || this.language || i.usedLng, s), u) {
|
|
467
|
+
const h = e.match(this.interpolator.nestingRegexp), f = h && h.length;
|
|
468
|
+
l < f && (s.nest = !1);
|
|
449
469
|
}
|
|
450
|
-
!s.lng &&
|
|
451
|
-
for (var u = arguments.length, c = new Array(u), p = 0; p < u; p++)
|
|
452
|
-
c[p] = arguments[p];
|
|
453
|
-
return r && r[0] === c[0] && !s.context ? (a.logger.warn(`It seems you are nesting recursively key: ${c[0]} in key: ${t[0]}`), null) : a.translate(...c, t);
|
|
454
|
-
}, s)), s.interpolation && this.interpolator.reset();
|
|
470
|
+
!s.lng && i && i.res && (s.lng = this.language || i.usedLng), s.nest !== !1 && (e = this.interpolator.nest(e, (...h) => n?.[0] === h[0] && !s.context ? (this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${t[0]}`), null) : this.translate(...h, t), s)), s.interpolation && this.interpolator.reset();
|
|
455
471
|
}
|
|
456
|
-
const
|
|
457
|
-
return e != null &&
|
|
472
|
+
const r = s.postProcess || this.options.postProcess, a = d(r) ? [r] : r;
|
|
473
|
+
return e != null && a?.length && s.applyPostProcessor !== !1 && (e = me.handle(a, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
458
474
|
i18nResolved: {
|
|
459
475
|
...i,
|
|
460
476
|
usedParams: this.getUsedParamsDetails(s)
|
|
@@ -462,106 +478,109 @@ class J extends B {
|
|
|
462
478
|
...s
|
|
463
479
|
} : s, this)), e;
|
|
464
480
|
}
|
|
465
|
-
resolve(e) {
|
|
466
|
-
let
|
|
467
|
-
return d(e) && (e = [e]), e.
|
|
481
|
+
resolve(e, t = {}) {
|
|
482
|
+
let s, i, n, r, a;
|
|
483
|
+
return d(e) && (e = [e]), Array.isArray(e) && (e = e.map((u) => typeof u == "function" ? V(u, {
|
|
484
|
+
...this.options,
|
|
485
|
+
...t
|
|
486
|
+
}) : u)), e.forEach((u) => {
|
|
468
487
|
if (this.isValidLookup(s)) return;
|
|
469
|
-
const
|
|
470
|
-
i =
|
|
471
|
-
let
|
|
472
|
-
this.options.fallbackNS && (
|
|
473
|
-
const
|
|
474
|
-
|
|
475
|
-
this.isValidLookup(s) || (
|
|
488
|
+
const l = this.extractFromKey(u, t), c = l.key;
|
|
489
|
+
i = c;
|
|
490
|
+
let h = l.namespaces;
|
|
491
|
+
this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
|
|
492
|
+
const f = t.count !== void 0 && !d(t.count), g = f && !t.ordinal && t.count === 0, p = t.context !== void 0 && (d(t.context) || typeof t.context == "number") && t.context !== "", m = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
493
|
+
h.forEach((S) => {
|
|
494
|
+
this.isValidLookup(s) || (a = S, !this.checkedLoadedFor[`${m[0]}-${S}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(a) && (this.checkedLoadedFor[`${m[0]}-${S}`] = !0, this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${a}" 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((L) => {
|
|
476
495
|
if (this.isValidLookup(s)) return;
|
|
477
|
-
|
|
478
|
-
const y = [
|
|
479
|
-
if (this.i18nFormat
|
|
480
|
-
this.i18nFormat.addLookupKeys(y,
|
|
496
|
+
r = L;
|
|
497
|
+
const y = [c];
|
|
498
|
+
if (this.i18nFormat?.addLookupKeys)
|
|
499
|
+
this.i18nFormat.addLookupKeys(y, c, L, S, t);
|
|
481
500
|
else {
|
|
482
|
-
let
|
|
483
|
-
|
|
484
|
-
const
|
|
485
|
-
if (
|
|
486
|
-
const
|
|
487
|
-
y.push(
|
|
501
|
+
let x;
|
|
502
|
+
f && (x = this.pluralResolver.getSuffix(L, t.count, t));
|
|
503
|
+
const R = `${this.options.pluralSeparator}zero`, T = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
504
|
+
if (f && (t.ordinal && x.startsWith(T) && y.push(c + x.replace(T, this.options.pluralSeparator)), y.push(c + x), g && y.push(c + R)), p) {
|
|
505
|
+
const I = `${c}${this.options.contextSeparator || "_"}${t.context}`;
|
|
506
|
+
y.push(I), f && (t.ordinal && x.startsWith(T) && y.push(I + x.replace(T, this.options.pluralSeparator)), y.push(I + x), g && y.push(I + R));
|
|
488
507
|
}
|
|
489
508
|
}
|
|
490
|
-
let
|
|
491
|
-
for (;
|
|
492
|
-
this.isValidLookup(s) || (
|
|
509
|
+
let b;
|
|
510
|
+
for (; b = y.pop(); )
|
|
511
|
+
this.isValidLookup(s) || (n = b, s = this.getResource(L, S, b, t));
|
|
493
512
|
}));
|
|
494
513
|
});
|
|
495
514
|
}), {
|
|
496
515
|
res: s,
|
|
497
516
|
usedKey: i,
|
|
498
|
-
exactUsedKey:
|
|
499
|
-
usedLng:
|
|
500
|
-
usedNS:
|
|
517
|
+
exactUsedKey: n,
|
|
518
|
+
usedLng: r,
|
|
519
|
+
usedNS: a
|
|
501
520
|
};
|
|
502
521
|
}
|
|
503
522
|
isValidLookup(e) {
|
|
504
523
|
return e !== void 0 && !(!this.options.returnNull && e === null) && !(!this.options.returnEmptyString && e === "");
|
|
505
524
|
}
|
|
506
|
-
getResource(e, t, s) {
|
|
507
|
-
|
|
508
|
-
return this.i18nFormat && this.i18nFormat.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
|
|
525
|
+
getResource(e, t, s, i = {}) {
|
|
526
|
+
return this.i18nFormat?.getResource ? this.i18nFormat.getResource(e, t, s, i) : this.resourceStore.getResource(e, t, s, i);
|
|
509
527
|
}
|
|
510
|
-
getUsedParamsDetails() {
|
|
511
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
528
|
+
getUsedParamsDetails(e = {}) {
|
|
512
529
|
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], s = e.replace && !d(e.replace);
|
|
513
530
|
let i = s ? e.replace : e;
|
|
514
|
-
if (s && typeof e.count < "u" && (i
|
|
531
|
+
if (s && typeof e.count < "u" && (i = {
|
|
532
|
+
...i,
|
|
533
|
+
count: e.count
|
|
534
|
+
}), this.options.interpolation.defaultVariables && (i = {
|
|
515
535
|
...this.options.interpolation.defaultVariables,
|
|
516
536
|
...i
|
|
517
537
|
}), !s) {
|
|
518
538
|
i = {
|
|
519
539
|
...i
|
|
520
540
|
};
|
|
521
|
-
for (const
|
|
522
|
-
delete i[
|
|
541
|
+
for (const n of t)
|
|
542
|
+
delete i[n];
|
|
523
543
|
}
|
|
524
544
|
return i;
|
|
525
545
|
}
|
|
526
546
|
static hasDefaultValue(e) {
|
|
527
547
|
const t = "defaultValue";
|
|
528
548
|
for (const s in e)
|
|
529
|
-
if (Object.prototype.hasOwnProperty.call(e, s) &&
|
|
549
|
+
if (Object.prototype.hasOwnProperty.call(e, s) && s.startsWith(t) && e[s] !== void 0)
|
|
530
550
|
return !0;
|
|
531
551
|
return !1;
|
|
532
552
|
}
|
|
533
553
|
}
|
|
534
|
-
|
|
535
|
-
class ne {
|
|
554
|
+
class le {
|
|
536
555
|
constructor(e) {
|
|
537
|
-
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger =
|
|
556
|
+
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = F.create("languageUtils"), this.resolveHierarchyCache = {};
|
|
557
|
+
}
|
|
558
|
+
clearCache() {
|
|
559
|
+
this.resolveHierarchyCache = {};
|
|
538
560
|
}
|
|
539
561
|
getScriptPartFromCode(e) {
|
|
540
|
-
if (e =
|
|
562
|
+
if (e = A(e), !e || !e.includes("-")) return null;
|
|
541
563
|
const t = e.split("-");
|
|
542
564
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
543
565
|
}
|
|
544
566
|
getLanguagePartFromCode(e) {
|
|
545
|
-
if (e =
|
|
567
|
+
if (e = A(e), !e || !e.includes("-")) return e;
|
|
546
568
|
const t = e.split("-");
|
|
547
569
|
return this.formatLanguageCode(t[0]);
|
|
548
570
|
}
|
|
549
571
|
formatLanguageCode(e) {
|
|
550
|
-
if (d(e) && e.
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
|
|
558
|
-
let s = e.split("-");
|
|
559
|
-
return this.options.lowerCaseLng ? s = s.map((i) => i.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = W(s[1].toLowerCase()))) : s.length === 3 && (s[0] = s[0].toLowerCase(), s[1].length === 2 && (s[1] = s[1].toUpperCase()), s[0] !== "sgn" && s[2].length === 2 && (s[2] = s[2].toUpperCase()), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = W(s[1].toLowerCase())), t.indexOf(s[2].toLowerCase()) > -1 && (s[2] = W(s[2].toLowerCase()))), s.join("-");
|
|
572
|
+
if (d(e) && e.includes("-")) {
|
|
573
|
+
let t;
|
|
574
|
+
try {
|
|
575
|
+
t = Intl.getCanonicalLocales(e)[0];
|
|
576
|
+
} catch {
|
|
577
|
+
}
|
|
578
|
+
return t && this.options.lowerCaseLng && (t = t.toLowerCase()), t || (this.options.lowerCaseLng ? e.toLowerCase() : e);
|
|
560
579
|
}
|
|
561
580
|
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
562
581
|
}
|
|
563
582
|
isSupportedCode(e) {
|
|
564
|
-
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.
|
|
583
|
+
return (this.options.load === "languageOnly" || this.options.nonExplicitSupportedLngs) && (e = this.getLanguagePartFromCode(e)), !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(e);
|
|
565
584
|
}
|
|
566
585
|
getBestMatchFromCodes(e) {
|
|
567
586
|
if (!e) return null;
|
|
@@ -572,13 +591,11 @@ class ne {
|
|
|
572
591
|
(!this.options.supportedLngs || this.isSupportedCode(i)) && (t = i);
|
|
573
592
|
}), !t && this.options.supportedLngs && e.forEach((s) => {
|
|
574
593
|
if (t) return;
|
|
575
|
-
const i = this.
|
|
594
|
+
const i = this.getScriptPartFromCode(s);
|
|
576
595
|
if (this.isSupportedCode(i)) return t = i;
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return r;
|
|
581
|
-
});
|
|
596
|
+
const n = this.getLanguagePartFromCode(s);
|
|
597
|
+
if (this.isSupportedCode(n)) return t = n;
|
|
598
|
+
t = this.options.supportedLngs.find((r) => r === n ? !0 : !r.includes("-") && !n.includes("-") ? !1 : !!(r.includes("-") && !n.includes("-") && r.slice(0, r.indexOf("-")) === n));
|
|
582
599
|
}), t || (t = this.getFallbackCodes(this.options.fallbackLng)[0]), t;
|
|
583
600
|
}
|
|
584
601
|
getFallbackCodes(e, t) {
|
|
@@ -589,223 +606,93 @@ class ne {
|
|
|
589
606
|
return s || (s = e[this.getScriptPartFromCode(t)]), s || (s = e[this.formatLanguageCode(t)]), s || (s = e[this.getLanguagePartFromCode(t)]), s || (s = e.default), s || [];
|
|
590
607
|
}
|
|
591
608
|
toResolveHierarchy(e, t) {
|
|
592
|
-
const s = this.
|
|
593
|
-
|
|
609
|
+
const s = this.options.fallbackLng, i = Array.isArray(s) ? s.join("|") : s;
|
|
610
|
+
i !== this._cachedFallbackLng && (this.resolveHierarchyCache = {}, this._cachedFallbackLng = i);
|
|
611
|
+
const n = t === void 0 || t === !1 || d(t), r = t === void 0 && typeof this.options.fallbackLng == "function", a = d(e) && n && !r;
|
|
612
|
+
let u = null;
|
|
613
|
+
if (a) {
|
|
614
|
+
let f;
|
|
615
|
+
t === void 0 ? f = "undefined" : t === !1 ? f = "boolean:false" : f = `string:${t}`, u = `${e.length}:${e}|${f}`;
|
|
616
|
+
}
|
|
617
|
+
if (u !== null) {
|
|
618
|
+
const f = this.resolveHierarchyCache[u];
|
|
619
|
+
if (f !== void 0) return f.slice();
|
|
620
|
+
}
|
|
621
|
+
const l = this.getFallbackCodes((t === !1 ? [] : t) || this.options.fallbackLng || [], e), c = [], h = (f) => {
|
|
622
|
+
f && (this.isSupportedCode(f) ? c.push(f) : this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`));
|
|
594
623
|
};
|
|
595
|
-
return d(e) && (e.
|
|
596
|
-
|
|
597
|
-
|
|
624
|
+
return d(e) && (e.includes("-") || e.includes("_")) ? (this.options.load !== "languageOnly" && h(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && h(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && h(this.getLanguagePartFromCode(e))) : d(e) && h(this.formatLanguageCode(e)), l.forEach((f) => {
|
|
625
|
+
const g = this.formatLanguageCode(f);
|
|
626
|
+
c.includes(g) || h(g);
|
|
627
|
+
}), u !== null ? (this.resolveHierarchyCache[u] = c, c.slice()) : c;
|
|
598
628
|
}
|
|
599
629
|
}
|
|
600
|
-
|
|
601
|
-
lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
|
|
602
|
-
nr: [1, 2],
|
|
603
|
-
fc: 1
|
|
604
|
-
}, {
|
|
605
|
-
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"],
|
|
606
|
-
nr: [1, 2],
|
|
607
|
-
fc: 2
|
|
608
|
-
}, {
|
|
609
|
-
lngs: ["ay", "bo", "cgg", "fa", "ht", "id", "ja", "jbo", "ka", "km", "ko", "ky", "lo", "ms", "sah", "su", "th", "tt", "ug", "vi", "wo", "zh"],
|
|
610
|
-
nr: [1],
|
|
611
|
-
fc: 3
|
|
612
|
-
}, {
|
|
613
|
-
lngs: ["be", "bs", "cnr", "dz", "hr", "ru", "sr", "uk"],
|
|
614
|
-
nr: [1, 2, 5],
|
|
615
|
-
fc: 4
|
|
616
|
-
}, {
|
|
617
|
-
lngs: ["ar"],
|
|
618
|
-
nr: [0, 1, 2, 3, 11, 100],
|
|
619
|
-
fc: 5
|
|
620
|
-
}, {
|
|
621
|
-
lngs: ["cs", "sk"],
|
|
622
|
-
nr: [1, 2, 5],
|
|
623
|
-
fc: 6
|
|
624
|
-
}, {
|
|
625
|
-
lngs: ["csb", "pl"],
|
|
626
|
-
nr: [1, 2, 5],
|
|
627
|
-
fc: 7
|
|
628
|
-
}, {
|
|
629
|
-
lngs: ["cy"],
|
|
630
|
-
nr: [1, 2, 3, 8],
|
|
631
|
-
fc: 8
|
|
632
|
-
}, {
|
|
633
|
-
lngs: ["fr"],
|
|
634
|
-
nr: [1, 2],
|
|
635
|
-
fc: 9
|
|
636
|
-
}, {
|
|
637
|
-
lngs: ["ga"],
|
|
638
|
-
nr: [1, 2, 3, 7, 11],
|
|
639
|
-
fc: 10
|
|
640
|
-
}, {
|
|
641
|
-
lngs: ["gd"],
|
|
642
|
-
nr: [1, 2, 3, 20],
|
|
643
|
-
fc: 11
|
|
644
|
-
}, {
|
|
645
|
-
lngs: ["is"],
|
|
646
|
-
nr: [1, 2],
|
|
647
|
-
fc: 12
|
|
648
|
-
}, {
|
|
649
|
-
lngs: ["jv"],
|
|
650
|
-
nr: [0, 1],
|
|
651
|
-
fc: 13
|
|
652
|
-
}, {
|
|
653
|
-
lngs: ["kw"],
|
|
654
|
-
nr: [1, 2, 3, 4],
|
|
655
|
-
fc: 14
|
|
656
|
-
}, {
|
|
657
|
-
lngs: ["lt"],
|
|
658
|
-
nr: [1, 2, 10],
|
|
659
|
-
fc: 15
|
|
660
|
-
}, {
|
|
661
|
-
lngs: ["lv"],
|
|
662
|
-
nr: [1, 2, 0],
|
|
663
|
-
fc: 16
|
|
664
|
-
}, {
|
|
665
|
-
lngs: ["mk"],
|
|
666
|
-
nr: [1, 2],
|
|
667
|
-
fc: 17
|
|
668
|
-
}, {
|
|
669
|
-
lngs: ["mnk"],
|
|
670
|
-
nr: [0, 1, 2],
|
|
671
|
-
fc: 18
|
|
672
|
-
}, {
|
|
673
|
-
lngs: ["mt"],
|
|
674
|
-
nr: [1, 2, 11, 20],
|
|
675
|
-
fc: 19
|
|
676
|
-
}, {
|
|
677
|
-
lngs: ["or"],
|
|
678
|
-
nr: [2, 1],
|
|
679
|
-
fc: 2
|
|
680
|
-
}, {
|
|
681
|
-
lngs: ["ro"],
|
|
682
|
-
nr: [1, 2, 20],
|
|
683
|
-
fc: 20
|
|
684
|
-
}, {
|
|
685
|
-
lngs: ["sl"],
|
|
686
|
-
nr: [5, 1, 2, 3],
|
|
687
|
-
fc: 21
|
|
688
|
-
}, {
|
|
689
|
-
lngs: ["he", "iw"],
|
|
690
|
-
nr: [1, 2, 20, 21],
|
|
691
|
-
fc: 22
|
|
692
|
-
}], Ce = {
|
|
693
|
-
1: (n) => +(n > 1),
|
|
694
|
-
2: (n) => +(n != 1),
|
|
695
|
-
3: (n) => 0,
|
|
696
|
-
4: (n) => n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2,
|
|
697
|
-
5: (n) => n == 0 ? 0 : n == 1 ? 1 : n == 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5,
|
|
698
|
-
6: (n) => n == 1 ? 0 : n >= 2 && n <= 4 ? 1 : 2,
|
|
699
|
-
7: (n) => n == 1 ? 0 : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2,
|
|
700
|
-
8: (n) => n == 1 ? 0 : n == 2 ? 1 : n != 8 && n != 11 ? 2 : 3,
|
|
701
|
-
9: (n) => +(n >= 2),
|
|
702
|
-
10: (n) => n == 1 ? 0 : n == 2 ? 1 : n < 7 ? 2 : n < 11 ? 3 : 4,
|
|
703
|
-
11: (n) => n == 1 || n == 11 ? 0 : n == 2 || n == 12 ? 1 : n > 2 && n < 20 ? 2 : 3,
|
|
704
|
-
12: (n) => +(n % 10 != 1 || n % 100 == 11),
|
|
705
|
-
13: (n) => +(n !== 0),
|
|
706
|
-
14: (n) => n == 1 ? 0 : n == 2 ? 1 : n == 3 ? 2 : 3,
|
|
707
|
-
15: (n) => n % 10 == 1 && n % 100 != 11 ? 0 : n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2,
|
|
708
|
-
16: (n) => n % 10 == 1 && n % 100 != 11 ? 0 : n !== 0 ? 1 : 2,
|
|
709
|
-
17: (n) => n == 1 || n % 10 == 1 && n % 100 != 11 ? 0 : 1,
|
|
710
|
-
18: (n) => n == 0 ? 0 : n == 1 ? 1 : 2,
|
|
711
|
-
19: (n) => n == 1 ? 0 : n == 0 || n % 100 > 1 && n % 100 < 11 ? 1 : n % 100 > 10 && n % 100 < 20 ? 2 : 3,
|
|
712
|
-
20: (n) => n == 1 ? 0 : n == 0 || n % 100 > 0 && n % 100 < 20 ? 1 : 2,
|
|
713
|
-
21: (n) => n % 100 == 1 ? 1 : n % 100 == 2 ? 2 : n % 100 == 3 || n % 100 == 4 ? 3 : 0,
|
|
714
|
-
22: (n) => n == 1 ? 0 : n == 2 ? 1 : (n < 0 || n > 10) && n % 10 == 0 ? 2 : 3
|
|
715
|
-
};
|
|
716
|
-
const Ne = ["v1", "v2", "v3"], Re = ["v4"], re = {
|
|
630
|
+
const ue = {
|
|
717
631
|
zero: 0,
|
|
718
632
|
one: 1,
|
|
719
633
|
two: 2,
|
|
720
634
|
few: 3,
|
|
721
635
|
many: 4,
|
|
722
636
|
other: 5
|
|
723
|
-
},
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
numbers: e.nr,
|
|
729
|
-
plurals: Ce[e.fc]
|
|
730
|
-
};
|
|
731
|
-
});
|
|
732
|
-
}), n;
|
|
637
|
+
}, ce = {
|
|
638
|
+
select: (o) => o === 1 ? "one" : "other",
|
|
639
|
+
resolvedOptions: () => ({
|
|
640
|
+
pluralCategories: ["one", "other"]
|
|
641
|
+
})
|
|
733
642
|
};
|
|
734
|
-
class
|
|
735
|
-
constructor(e) {
|
|
736
|
-
|
|
737
|
-
this.languageUtils = e, this.options = t, this.logger = N.create("pluralResolver"), (!this.options.compatibilityJSON || Re.includes(this.options.compatibilityJSON)) && (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 = Pe(), this.pluralRulesCache = {};
|
|
738
|
-
}
|
|
739
|
-
addRule(e, t) {
|
|
740
|
-
this.rules[e] = t;
|
|
643
|
+
class ke {
|
|
644
|
+
constructor(e, t = {}) {
|
|
645
|
+
this.languageUtils = e, this.options = t, this.logger = F.create("pluralResolver"), this.pluralRulesCache = {};
|
|
741
646
|
}
|
|
742
647
|
clearCache() {
|
|
743
648
|
this.pluralRulesCache = {};
|
|
744
649
|
}
|
|
745
|
-
getRule(e) {
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
650
|
+
getRule(e, t = {}) {
|
|
651
|
+
const s = A(e === "dev" ? "en" : e), i = t.ordinal ? "ordinal" : "cardinal", n = JSON.stringify({
|
|
652
|
+
cleanedCode: s,
|
|
653
|
+
type: i
|
|
654
|
+
});
|
|
655
|
+
if (n in this.pluralRulesCache)
|
|
656
|
+
return this.pluralRulesCache[n];
|
|
657
|
+
let r;
|
|
658
|
+
try {
|
|
659
|
+
r = new Intl.PluralRules(s, {
|
|
750
660
|
type: i
|
|
751
661
|
});
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
});
|
|
759
|
-
} catch {
|
|
760
|
-
if (!e.match(/-|_/)) return;
|
|
761
|
-
const l = this.languageUtils.getLanguagePartFromCode(e);
|
|
762
|
-
a = this.getRule(l, t);
|
|
763
|
-
}
|
|
764
|
-
return this.pluralRulesCache[r] = a, a;
|
|
662
|
+
} catch {
|
|
663
|
+
if (typeof Intl > "u")
|
|
664
|
+
return this.logger.error("No Intl support, please use an Intl polyfill!"), ce;
|
|
665
|
+
if (!e.match(/-|_/)) return ce;
|
|
666
|
+
const u = this.languageUtils.getLanguagePartFromCode(e);
|
|
667
|
+
r = this.getRule(u, t);
|
|
765
668
|
}
|
|
766
|
-
return this.
|
|
669
|
+
return this.pluralRulesCache[n] = r, r;
|
|
767
670
|
}
|
|
768
|
-
needsPlural(e) {
|
|
769
|
-
let
|
|
770
|
-
|
|
771
|
-
return this.shouldUseIntlApi() ? s && s.resolvedOptions().pluralCategories.length > 1 : s && s.numbers.length > 1;
|
|
671
|
+
needsPlural(e, t = {}) {
|
|
672
|
+
let s = this.getRule(e, t);
|
|
673
|
+
return s || (s = this.getRule("dev", t)), s?.resolvedOptions().pluralCategories.length > 1;
|
|
772
674
|
}
|
|
773
|
-
getPluralFormsOfKey(e, t) {
|
|
774
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
675
|
+
getPluralFormsOfKey(e, t, s = {}) {
|
|
775
676
|
return this.getSuffixes(e, s).map((i) => `${t}${i}`);
|
|
776
677
|
}
|
|
777
|
-
getSuffixes(e) {
|
|
778
|
-
let
|
|
779
|
-
|
|
780
|
-
return s ? this.shouldUseIntlApi() ? s.resolvedOptions().pluralCategories.sort((i, r) => re[i] - re[r]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : s.numbers.map((i) => this.getSuffix(e, i, t)) : [];
|
|
678
|
+
getSuffixes(e, t = {}) {
|
|
679
|
+
let s = this.getRule(e, t);
|
|
680
|
+
return s || (s = this.getRule("dev", t)), s ? s.resolvedOptions().pluralCategories.sort((i, n) => ue[i] - ue[n]).map((i) => `${this.options.prepend}${t.ordinal ? `ordinal${this.options.prepend}` : ""}${i}`) : [];
|
|
781
681
|
}
|
|
782
|
-
getSuffix(e, t) {
|
|
783
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
682
|
+
getSuffix(e, t, s = {}) {
|
|
784
683
|
const i = this.getRule(e, s);
|
|
785
|
-
return i ?
|
|
786
|
-
}
|
|
787
|
-
getSuffixRetroCompatible(e, t) {
|
|
788
|
-
const s = e.noAbs ? e.plurals(t) : e.plurals(Math.abs(t));
|
|
789
|
-
let i = e.numbers[s];
|
|
790
|
-
this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 && (i === 2 ? i = "plural" : i === 1 && (i = ""));
|
|
791
|
-
const r = () => this.options.prepend && i.toString() ? this.options.prepend + i.toString() : i.toString();
|
|
792
|
-
return this.options.compatibilityJSON === "v1" ? i === 1 ? "" : typeof i == "number" ? `_plural_${i.toString()}` : r() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? r() : this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
|
|
793
|
-
}
|
|
794
|
-
shouldUseIntlApi() {
|
|
795
|
-
return !Ne.includes(this.options.compatibilityJSON);
|
|
684
|
+
return i ? `${this.options.prepend}${s.ordinal ? `ordinal${this.options.prepend}` : ""}${i.select(t)}` : (this.logger.warn(`no plural rule found for: ${e}`), this.getSuffix("dev", t, s));
|
|
796
685
|
}
|
|
797
686
|
}
|
|
798
|
-
const
|
|
799
|
-
let
|
|
800
|
-
return
|
|
801
|
-
}
|
|
802
|
-
class
|
|
803
|
-
constructor() {
|
|
804
|
-
|
|
805
|
-
this.logger = N.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
|
|
687
|
+
const he = (o, e, t, s = ".", i = !0) => {
|
|
688
|
+
let n = Oe(o, e, t);
|
|
689
|
+
return n == null && i && d(t) && (n = X(o, t, s), n === void 0 && (n = X(e, t, s))), n;
|
|
690
|
+
};
|
|
691
|
+
class fe {
|
|
692
|
+
constructor(e = {}) {
|
|
693
|
+
this.logger = F.create("interpolator"), this.options = e, this.format = e?.interpolation?.format || ((t) => t), this.init(e);
|
|
806
694
|
}
|
|
807
|
-
init() {
|
|
808
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
695
|
+
init(e = {}) {
|
|
809
696
|
e.interpolation || (e.interpolation = {
|
|
810
697
|
escapeValue: !0
|
|
811
698
|
});
|
|
@@ -813,127 +700,130 @@ class ke {
|
|
|
813
700
|
escape: t,
|
|
814
701
|
escapeValue: s,
|
|
815
702
|
useRawValueToEscape: i,
|
|
816
|
-
prefix:
|
|
817
|
-
prefixEscaped:
|
|
818
|
-
suffix:
|
|
819
|
-
suffixEscaped:
|
|
820
|
-
formatSeparator:
|
|
821
|
-
unescapeSuffix:
|
|
822
|
-
unescapePrefix:
|
|
823
|
-
nestingPrefix:
|
|
824
|
-
nestingPrefixEscaped:
|
|
703
|
+
prefix: n,
|
|
704
|
+
prefixEscaped: r,
|
|
705
|
+
suffix: a,
|
|
706
|
+
suffixEscaped: u,
|
|
707
|
+
formatSeparator: l,
|
|
708
|
+
unescapeSuffix: c,
|
|
709
|
+
unescapePrefix: h,
|
|
710
|
+
nestingPrefix: f,
|
|
711
|
+
nestingPrefixEscaped: g,
|
|
825
712
|
nestingSuffix: p,
|
|
826
|
-
nestingSuffixEscaped:
|
|
827
|
-
nestingOptionsSeparator:
|
|
828
|
-
maxReplaces:
|
|
713
|
+
nestingSuffixEscaped: m,
|
|
714
|
+
nestingOptionsSeparator: S,
|
|
715
|
+
maxReplaces: L,
|
|
829
716
|
alwaysFormat: y
|
|
830
717
|
} = e.interpolation;
|
|
831
|
-
this.escape = t !== void 0 ? t :
|
|
718
|
+
this.escape = t !== void 0 ? t : Ce, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = i !== void 0 ? i : !1, this.prefix = n ? j(n) : r || "{{", this.suffix = a ? j(a) : u || "}}", this.formatSeparator = l || ",", this.unescapePrefix = c ? "" : h ? j(h) : "-", this.unescapeSuffix = this.unescapePrefix ? "" : c ? j(c) : "", this.nestingPrefix = f ? j(f) : g || j("$t("), this.nestingSuffix = p ? j(p) : m || j(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = L || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
|
|
832
719
|
}
|
|
833
720
|
reset() {
|
|
834
721
|
this.options && this.init(this.options);
|
|
835
722
|
}
|
|
836
723
|
resetRegExp() {
|
|
837
|
-
const e = (t, s) => t
|
|
838
|
-
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}(
|
|
724
|
+
const e = (t, s) => t?.source === s ? (t.lastIndex = 0, t) : new RegExp(s, "g");
|
|
725
|
+
this.regexp = e(this.regexp, `${this.prefix}(.+?)${this.suffix}`), this.regexpUnescape = e(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`), this.nestingRegexp = e(this.nestingRegexp, `${this.nestingPrefix}((?:[^()"']|"[^"]*"|'[^']*'|\\((?:[^()"']|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`);
|
|
839
726
|
}
|
|
840
727
|
interpolate(e, t, s, i) {
|
|
841
|
-
let r, a
|
|
842
|
-
const
|
|
843
|
-
if (
|
|
844
|
-
const
|
|
845
|
-
return this.alwaysFormat ? this.format(
|
|
728
|
+
let n, r, a;
|
|
729
|
+
const u = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, l = (m) => {
|
|
730
|
+
if (!m.includes(this.formatSeparator)) {
|
|
731
|
+
const b = he(t, u, m, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
732
|
+
return this.alwaysFormat ? this.format(b, void 0, s, {
|
|
846
733
|
...i,
|
|
847
734
|
...t,
|
|
848
|
-
interpolationkey:
|
|
849
|
-
}) :
|
|
735
|
+
interpolationkey: m
|
|
736
|
+
}) : b;
|
|
850
737
|
}
|
|
851
|
-
const
|
|
852
|
-
return this.format(
|
|
738
|
+
const S = m.split(this.formatSeparator), L = S.shift().trim(), y = S.join(this.formatSeparator).trim();
|
|
739
|
+
return this.format(he(t, u, L, this.options.keySeparator, this.options.ignoreJSONStructure), y, s, {
|
|
853
740
|
...i,
|
|
854
741
|
...t,
|
|
855
|
-
interpolationkey:
|
|
742
|
+
interpolationkey: L
|
|
856
743
|
});
|
|
857
744
|
};
|
|
858
|
-
this.resetRegExp();
|
|
859
|
-
const
|
|
860
|
-
return [{
|
|
745
|
+
this.resetRegExp(), !this.escapeValue && typeof e == "string" && /\$t\([^)]*\{[^}]*\{\{/.test(e) && this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");
|
|
746
|
+
const c = i?.missingInterpolationHandler || this.options.missingInterpolationHandler, h = i?.interpolation?.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables, f = [{
|
|
861
747
|
regex: this.regexpUnescape,
|
|
862
|
-
safeValue: (
|
|
748
|
+
safeValue: (m) => m
|
|
863
749
|
}, {
|
|
864
750
|
regex: this.regexp,
|
|
865
|
-
safeValue: (
|
|
866
|
-
}]
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
751
|
+
safeValue: (m) => this.escapeValue ? this.escape(m) : m
|
|
752
|
+
}], g = [];
|
|
753
|
+
let p = 0;
|
|
754
|
+
return f.forEach((m) => {
|
|
755
|
+
for (a = 0; n = m.regex.exec(e); ) {
|
|
756
|
+
const S = n.index - p, L = g.find(([x, R]) => S >= x && S < R);
|
|
757
|
+
if (L) {
|
|
758
|
+
m.regex.lastIndex = L[1] + p;
|
|
759
|
+
continue;
|
|
760
|
+
}
|
|
761
|
+
const y = n[1].trim();
|
|
762
|
+
if (r = l(y), r === void 0)
|
|
763
|
+
if (typeof c == "function") {
|
|
764
|
+
const x = c(e, n, i);
|
|
765
|
+
r = d(x) ? x : "";
|
|
766
|
+
} else if (i && Object.prototype.hasOwnProperty.call(i, y))
|
|
767
|
+
r = "";
|
|
768
|
+
else if (h) {
|
|
769
|
+
r = n[0];
|
|
877
770
|
continue;
|
|
878
771
|
} else
|
|
879
|
-
this.logger.warn(`missed to pass in variable ${
|
|
880
|
-
else !d(
|
|
881
|
-
const
|
|
882
|
-
if (e = e.
|
|
772
|
+
this.logger.warn(`missed to pass in variable ${y} for interpolating ${e}`), r = "";
|
|
773
|
+
else !d(r) && !this.useRawValueToEscape && (r = z(r));
|
|
774
|
+
const b = z(m.safeValue(r));
|
|
775
|
+
if (e = e.slice(0, n.index) + b + e.slice(n.index + n[0].length), h ? (m.regex === this.regexpUnescape ? g.push([n.index, n.index + b.length]) : p += b.length - n[0].length, m.regex.lastIndex += b.length, m.regex.lastIndex -= n[0].length) : m.regex.lastIndex = 0, a++, a >= this.maxReplaces)
|
|
883
776
|
break;
|
|
884
777
|
}
|
|
885
778
|
}), e;
|
|
886
779
|
}
|
|
887
|
-
nest(e, t) {
|
|
888
|
-
let
|
|
889
|
-
const
|
|
890
|
-
const
|
|
891
|
-
if (
|
|
892
|
-
const
|
|
893
|
-
let
|
|
894
|
-
|
|
895
|
-
const
|
|
896
|
-
(
|
|
780
|
+
nest(e, t, s = {}) {
|
|
781
|
+
let i, n, r;
|
|
782
|
+
const a = (h, f) => {
|
|
783
|
+
const g = this.nestingOptionsSeparator;
|
|
784
|
+
if (!h.includes(g)) return h;
|
|
785
|
+
const p = h.split(new RegExp(`${j(g)}[ ]*{`));
|
|
786
|
+
let m = `{${p[1]}`;
|
|
787
|
+
h = p[0], m = this.interpolate(m, r);
|
|
788
|
+
const S = m.match(/'/g), L = m.match(/"/g);
|
|
789
|
+
((S?.length ?? 0) % 2 === 0 && !L || (L?.length ?? 0) % 2 !== 0) && (m = m.replace(/'/g, '"'));
|
|
897
790
|
try {
|
|
898
|
-
|
|
791
|
+
r = JSON.parse(m), f && (r = {
|
|
899
792
|
...f,
|
|
900
|
-
...
|
|
793
|
+
...r
|
|
901
794
|
});
|
|
902
|
-
} catch (
|
|
903
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${
|
|
795
|
+
} catch (y) {
|
|
796
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${h}`, y), `${h}${g}${m}`;
|
|
904
797
|
}
|
|
905
|
-
return
|
|
906
|
-
};
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
798
|
+
return r.defaultValue && r.defaultValue.includes(this.prefix) && delete r.defaultValue, h;
|
|
799
|
+
}, u = new RegExp(this.nestingRegexp);
|
|
800
|
+
let l = "", c = 0;
|
|
801
|
+
for (; i = u.exec(e); ) {
|
|
802
|
+
let h = [];
|
|
803
|
+
r = {
|
|
910
804
|
...s
|
|
911
|
-
},
|
|
912
|
-
|
|
913
|
-
if (i[
|
|
914
|
-
|
|
915
|
-
i[1] = h.shift(), l = h, f = !0;
|
|
916
|
-
}
|
|
917
|
-
if (r = t(o.call(this, i[1].trim(), a), a), r && i[0] === e && !d(r)) return r;
|
|
918
|
-
d(r) || (r = q(r)), r || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), r = ""), f && (r = l.reduce((h, g) => this.format(h, g, s.lng, {
|
|
805
|
+
}, r = r.replace && !d(r.replace) ? r.replace : r, r.applyPostProcessor = !1, delete r.defaultValue;
|
|
806
|
+
const f = /{.*}/s.test(i[1]) ? i[1].lastIndexOf("}") + 1 : i[1].indexOf(this.formatSeparator);
|
|
807
|
+
if (f !== -1 && (h = i[1].slice(f).split(this.formatSeparator).map((g) => g.trim()).filter(Boolean), i[1] = i[1].slice(0, f)), n = t(a.call(this, i[1].trim(), r), r), n && i[0] === e && !d(n)) return n;
|
|
808
|
+
d(n) || (n = z(n)), n || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`), n = ""), h.length && (n = h.reduce((g, p) => this.format(g, p, s.lng, {
|
|
919
809
|
...s,
|
|
920
810
|
interpolationkey: i[1].trim()
|
|
921
|
-
}),
|
|
811
|
+
}), n.trim())), l += e.slice(c, i.index) + z(n), c = u.lastIndex, this.regexp.lastIndex = 0;
|
|
922
812
|
}
|
|
923
|
-
return e;
|
|
813
|
+
return c ? l + e.slice(c) : e;
|
|
924
814
|
}
|
|
925
815
|
}
|
|
926
|
-
const Ee = (
|
|
927
|
-
let e =
|
|
816
|
+
const Ee = (o) => {
|
|
817
|
+
let e = o.toLowerCase().trim();
|
|
928
818
|
const t = {};
|
|
929
|
-
if (
|
|
930
|
-
const s =
|
|
819
|
+
if (o.includes("(")) {
|
|
820
|
+
const s = o.split("(");
|
|
931
821
|
e = s[0].toLowerCase().trim();
|
|
932
|
-
const i = s[1].
|
|
933
|
-
e === "currency" && i.
|
|
934
|
-
if (
|
|
935
|
-
const [
|
|
936
|
-
t[
|
|
822
|
+
const i = s[1].slice(0, -1);
|
|
823
|
+
e === "currency" && !i.includes(":") ? t.currency || (t.currency = i.trim()) : e === "relativetime" && !i.includes(":") ? t.range || (t.range = i.trim()) : i.split(";").forEach((r) => {
|
|
824
|
+
if (r) {
|
|
825
|
+
const [a, ...u] = r.split(":"), l = u.join(":").trim().replace(/^'+|'+$/g, ""), c = a.trim();
|
|
826
|
+
t[c] || (t[c] = l), l === "false" && (t[c] = !1), l === "true" && (t[c] = !0), isNaN(l) || (t[c] = parseInt(l, 10));
|
|
937
827
|
}
|
|
938
828
|
});
|
|
939
829
|
}
|
|
@@ -941,193 +831,197 @@ const Ee = (n) => {
|
|
|
941
831
|
formatName: e,
|
|
942
832
|
formatOptions: t
|
|
943
833
|
};
|
|
944
|
-
},
|
|
834
|
+
}, de = (o) => {
|
|
945
835
|
const e = {};
|
|
946
836
|
return (t, s, i) => {
|
|
947
|
-
let
|
|
948
|
-
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (
|
|
949
|
-
...
|
|
837
|
+
let n = i;
|
|
838
|
+
i && i.interpolationkey && i.formatParams && i.formatParams[i.interpolationkey] && i[i.interpolationkey] && (n = {
|
|
839
|
+
...n,
|
|
950
840
|
[i.interpolationkey]: void 0
|
|
951
841
|
});
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
842
|
+
let r;
|
|
843
|
+
try {
|
|
844
|
+
r = s + JSON.stringify(n);
|
|
845
|
+
} catch {
|
|
846
|
+
return o(A(s), i)(t);
|
|
847
|
+
}
|
|
848
|
+
let a = e[r];
|
|
849
|
+
return a || (a = o(A(s), i), e[r] = a), a(t);
|
|
955
850
|
};
|
|
956
|
-
};
|
|
957
|
-
class
|
|
958
|
-
constructor() {
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
851
|
+
}, Te = (o) => (e, t, s) => o(A(t), s)(e);
|
|
852
|
+
class Ie {
|
|
853
|
+
constructor(e = {}) {
|
|
854
|
+
this.logger = F.create("formatter"), this.options = e, this.init(e);
|
|
855
|
+
}
|
|
856
|
+
init(e, t = {
|
|
857
|
+
interpolation: {}
|
|
858
|
+
}) {
|
|
859
|
+
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
860
|
+
const s = t.cacheInBuiltFormats ? de : Te;
|
|
861
|
+
this.formats = {
|
|
862
|
+
number: s((i, n) => {
|
|
863
|
+
const r = new Intl.NumberFormat(i, {
|
|
864
|
+
...n
|
|
964
865
|
});
|
|
965
|
-
return (
|
|
866
|
+
return (a) => r.format(a);
|
|
966
867
|
}),
|
|
967
|
-
currency:
|
|
968
|
-
const
|
|
969
|
-
...
|
|
868
|
+
currency: s((i, n) => {
|
|
869
|
+
const r = new Intl.NumberFormat(i, {
|
|
870
|
+
...n,
|
|
970
871
|
style: "currency"
|
|
971
872
|
});
|
|
972
|
-
return (
|
|
873
|
+
return (a) => r.format(a);
|
|
973
874
|
}),
|
|
974
|
-
datetime:
|
|
975
|
-
const
|
|
976
|
-
...
|
|
875
|
+
datetime: s((i, n) => {
|
|
876
|
+
const r = new Intl.DateTimeFormat(i, {
|
|
877
|
+
...n
|
|
977
878
|
});
|
|
978
|
-
return (
|
|
879
|
+
return (a) => r.format(a);
|
|
979
880
|
}),
|
|
980
|
-
relativetime:
|
|
981
|
-
const
|
|
982
|
-
...
|
|
881
|
+
relativetime: s((i, n) => {
|
|
882
|
+
const r = new Intl.RelativeTimeFormat(i, {
|
|
883
|
+
...n
|
|
983
884
|
});
|
|
984
|
-
return (
|
|
885
|
+
return (a) => r.format(a, n.range || "day");
|
|
985
886
|
}),
|
|
986
|
-
list:
|
|
987
|
-
const
|
|
988
|
-
...
|
|
887
|
+
list: s((i, n) => {
|
|
888
|
+
const r = new Intl.ListFormat(i, {
|
|
889
|
+
...n
|
|
989
890
|
});
|
|
990
|
-
return (
|
|
891
|
+
return (a) => r.format(a);
|
|
991
892
|
})
|
|
992
|
-
}, this.init(e);
|
|
993
|
-
}
|
|
994
|
-
init(e) {
|
|
995
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
996
|
-
interpolation: {}
|
|
997
893
|
};
|
|
998
|
-
this.formatSeparator = t.interpolation.formatSeparator || ",";
|
|
999
894
|
}
|
|
1000
895
|
add(e, t) {
|
|
1001
896
|
this.formats[e.toLowerCase().trim()] = t;
|
|
1002
897
|
}
|
|
1003
898
|
addCached(e, t) {
|
|
1004
|
-
this.formats[e.toLowerCase().trim()] =
|
|
1005
|
-
}
|
|
1006
|
-
format(e, t, s) {
|
|
1007
|
-
|
|
1008
|
-
const
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
899
|
+
this.formats[e.toLowerCase().trim()] = de(t);
|
|
900
|
+
}
|
|
901
|
+
format(e, t, s, i = {}) {
|
|
902
|
+
if (!t || e == null) return e;
|
|
903
|
+
const n = t.split(this.formatSeparator), r = [];
|
|
904
|
+
for (let u = 0; u < n.length; u++) {
|
|
905
|
+
let l = n[u];
|
|
906
|
+
for (; l.indexOf("(") > -1 && !l.includes(")") && u + 1 < n.length; )
|
|
907
|
+
l = `${l}${this.formatSeparator}${n[++u]}`;
|
|
908
|
+
r.push(l);
|
|
1012
909
|
}
|
|
1013
|
-
return r.reduce((
|
|
910
|
+
return r.reduce((u, l) => {
|
|
1014
911
|
const {
|
|
1015
|
-
formatName:
|
|
912
|
+
formatName: c,
|
|
1016
913
|
formatOptions: h
|
|
1017
914
|
} = Ee(l);
|
|
1018
|
-
if (this.formats[
|
|
1019
|
-
let
|
|
915
|
+
if (this.formats[c]) {
|
|
916
|
+
let f = u;
|
|
1020
917
|
try {
|
|
1021
|
-
const
|
|
1022
|
-
|
|
918
|
+
const g = i?.formatParams?.[i.interpolationkey] || {}, p = g.locale || g.lng || i.locale || i.lng || s;
|
|
919
|
+
f = this.formats[c](u, p, {
|
|
1023
920
|
...h,
|
|
1024
921
|
...i,
|
|
1025
|
-
...
|
|
922
|
+
...g
|
|
1026
923
|
});
|
|
1027
|
-
} catch (
|
|
1028
|
-
this.logger.warn(
|
|
924
|
+
} catch (g) {
|
|
925
|
+
this.logger.warn(g);
|
|
1029
926
|
}
|
|
1030
|
-
return
|
|
927
|
+
return f;
|
|
1031
928
|
} else
|
|
1032
|
-
this.logger.warn(`there was no format function for ${
|
|
1033
|
-
return
|
|
929
|
+
this.logger.warn(`there was no format function for ${c}`);
|
|
930
|
+
return u;
|
|
1034
931
|
}, e);
|
|
1035
932
|
}
|
|
1036
933
|
}
|
|
1037
|
-
const
|
|
1038
|
-
|
|
934
|
+
const Ve = (o, e) => {
|
|
935
|
+
o.pending[e] !== void 0 && (delete o.pending[e], o.pendingCount--);
|
|
1039
936
|
};
|
|
1040
|
-
class
|
|
1041
|
-
constructor(e, t, s) {
|
|
1042
|
-
|
|
1043
|
-
super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = N.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, i.backend, i);
|
|
937
|
+
class Ae extends Q {
|
|
938
|
+
constructor(e, t, s, i = {}) {
|
|
939
|
+
super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = i, this.logger = F.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = i.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = i.maxRetries >= 0 ? i.maxRetries : 5, this.retryTimeout = i.retryTimeout >= 1 ? i.retryTimeout : 350, this.state = {}, this.queue = [], this.backend?.init?.(s, i.backend, i);
|
|
1044
940
|
}
|
|
1045
941
|
queueLoad(e, t, s, i) {
|
|
1046
|
-
const
|
|
1047
|
-
return e.forEach((
|
|
1048
|
-
let
|
|
1049
|
-
t.forEach((
|
|
1050
|
-
const
|
|
1051
|
-
!s.reload && this.store.hasResourceBundle(
|
|
1052
|
-
}),
|
|
1053
|
-
}), (Object.keys(
|
|
1054
|
-
pending:
|
|
1055
|
-
pendingCount: Object.keys(
|
|
942
|
+
const n = {}, r = {}, a = {}, u = {};
|
|
943
|
+
return e.forEach((l) => {
|
|
944
|
+
let c = !0;
|
|
945
|
+
t.forEach((h) => {
|
|
946
|
+
const f = `${l}|${h}`;
|
|
947
|
+
!s.reload && this.store.hasResourceBundle(l, h) ? this.state[f] = 2 : this.state[f] < 0 || (this.state[f] === 1 ? r[f] === void 0 && (r[f] = !0) : (this.state[f] = 1, c = !1, r[f] === void 0 && (r[f] = !0), n[f] === void 0 && (n[f] = !0), u[h] === void 0 && (u[h] = !0)));
|
|
948
|
+
}), c || (a[l] = !0);
|
|
949
|
+
}), (Object.keys(n).length || Object.keys(r).length) && this.queue.push({
|
|
950
|
+
pending: r,
|
|
951
|
+
pendingCount: Object.keys(r).length,
|
|
1056
952
|
loaded: {},
|
|
1057
953
|
errors: [],
|
|
1058
954
|
callback: i
|
|
1059
955
|
}), {
|
|
1060
|
-
toLoad: Object.keys(
|
|
1061
|
-
pending: Object.keys(
|
|
1062
|
-
toLoadLanguages: Object.keys(
|
|
1063
|
-
toLoadNamespaces: Object.keys(
|
|
956
|
+
toLoad: Object.keys(n),
|
|
957
|
+
pending: Object.keys(r),
|
|
958
|
+
toLoadLanguages: Object.keys(a),
|
|
959
|
+
toLoadNamespaces: Object.keys(u)
|
|
1064
960
|
};
|
|
1065
961
|
}
|
|
1066
962
|
loaded(e, t, s) {
|
|
1067
|
-
const i = e.split("|"),
|
|
1068
|
-
t && this.emit("failedLoading",
|
|
963
|
+
const i = e.split("|"), n = i[0], r = i[1];
|
|
964
|
+
t && this.emit("failedLoading", n, r, t), !t && s && this.store.addResourceBundle(n, r, s, void 0, void 0, {
|
|
1069
965
|
skipCopy: !0
|
|
1070
966
|
}), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
|
|
1071
|
-
const
|
|
1072
|
-
this.queue.forEach((
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
const
|
|
1076
|
-
|
|
1077
|
-
|
|
967
|
+
const a = {};
|
|
968
|
+
this.queue.forEach((u) => {
|
|
969
|
+
ve(u.loaded, [n], r), Ve(u, e), t && u.errors.push(t), u.pendingCount === 0 && !u.done && (Object.keys(u.loaded).forEach((l) => {
|
|
970
|
+
a[l] || (a[l] = {});
|
|
971
|
+
const c = u.loaded[l];
|
|
972
|
+
c.length && c.forEach((h) => {
|
|
973
|
+
a[l][h] === void 0 && (a[l][h] = !0);
|
|
1078
974
|
});
|
|
1079
|
-
}),
|
|
1080
|
-
}), this.emit("loaded",
|
|
975
|
+
}), u.done = !0, u.errors.length ? u.callback(u.errors) : u.callback());
|
|
976
|
+
}), this.emit("loaded", a), this.queue = this.queue.filter((u) => !u.done);
|
|
1081
977
|
}
|
|
1082
|
-
read(e, t, s) {
|
|
1083
|
-
|
|
1084
|
-
if (!e.length) return a(null, {});
|
|
978
|
+
read(e, t, s, i = 0, n = this.retryTimeout, r) {
|
|
979
|
+
if (!e.length) return r(null, {});
|
|
1085
980
|
if (this.readingCalls >= this.maxParallelReads) {
|
|
1086
981
|
this.waitingReads.push({
|
|
1087
982
|
lng: e,
|
|
1088
983
|
ns: t,
|
|
1089
984
|
fcName: s,
|
|
1090
985
|
tried: i,
|
|
1091
|
-
wait:
|
|
1092
|
-
callback:
|
|
986
|
+
wait: n,
|
|
987
|
+
callback: r
|
|
1093
988
|
});
|
|
1094
989
|
return;
|
|
1095
990
|
}
|
|
1096
991
|
this.readingCalls++;
|
|
1097
|
-
const
|
|
992
|
+
const a = (l, c) => {
|
|
1098
993
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
1099
|
-
const
|
|
1100
|
-
this.read(
|
|
994
|
+
const h = this.waitingReads.shift();
|
|
995
|
+
this.read(h.lng, h.ns, h.fcName, h.tried, h.wait, h.callback);
|
|
1101
996
|
}
|
|
1102
|
-
if (
|
|
997
|
+
if (l && c && i < this.maxRetries) {
|
|
1103
998
|
setTimeout(() => {
|
|
1104
|
-
this.read
|
|
1105
|
-
},
|
|
999
|
+
this.read(e, t, s, i + 1, n * 2, r);
|
|
1000
|
+
}, n);
|
|
1106
1001
|
return;
|
|
1107
1002
|
}
|
|
1108
|
-
|
|
1109
|
-
},
|
|
1110
|
-
if (
|
|
1003
|
+
r(l, c);
|
|
1004
|
+
}, u = this.backend[s].bind(this.backend);
|
|
1005
|
+
if (u.length === 2) {
|
|
1111
1006
|
try {
|
|
1112
|
-
const
|
|
1113
|
-
|
|
1114
|
-
} catch (
|
|
1115
|
-
|
|
1007
|
+
const l = u(e, t);
|
|
1008
|
+
l && typeof l.then == "function" ? l.then((c) => a(null, c)).catch(a) : a(null, l);
|
|
1009
|
+
} catch (l) {
|
|
1010
|
+
a(l);
|
|
1116
1011
|
}
|
|
1117
1012
|
return;
|
|
1118
1013
|
}
|
|
1119
|
-
return
|
|
1014
|
+
return u(e, t, a);
|
|
1120
1015
|
}
|
|
1121
|
-
prepareLoading(e, t) {
|
|
1122
|
-
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, i = arguments.length > 3 ? arguments[3] : void 0;
|
|
1016
|
+
prepareLoading(e, t, s = {}, i) {
|
|
1123
1017
|
if (!this.backend)
|
|
1124
1018
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
1125
1019
|
d(e) && (e = this.languageUtils.toResolveHierarchy(e)), d(t) && (t = [t]);
|
|
1126
|
-
const
|
|
1127
|
-
if (!
|
|
1128
|
-
return
|
|
1129
|
-
|
|
1130
|
-
this.loadOne(
|
|
1020
|
+
const n = this.queueLoad(e, t, s, i);
|
|
1021
|
+
if (!n.toLoad.length)
|
|
1022
|
+
return n.pending.length || i(), null;
|
|
1023
|
+
n.toLoad.forEach((r) => {
|
|
1024
|
+
this.loadOne(r);
|
|
1131
1025
|
});
|
|
1132
1026
|
}
|
|
1133
1027
|
load(e, t, s) {
|
|
@@ -1138,43 +1032,41 @@ class je extends B {
|
|
|
1138
1032
|
reload: !0
|
|
1139
1033
|
}, s);
|
|
1140
1034
|
}
|
|
1141
|
-
loadOne(e) {
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
a && this.logger.warn(`${t}loading namespace ${r} for language ${i} failed`, a), !a && o && this.logger.log(`${t}loaded namespace ${r} for language ${i}`, o), this.loaded(e, a, o);
|
|
1035
|
+
loadOne(e, t = "") {
|
|
1036
|
+
const s = e.split("|"), i = s[0], n = s[1];
|
|
1037
|
+
this.read(i, n, "read", void 0, void 0, (r, a) => {
|
|
1038
|
+
r && this.logger.warn(`${t}loading namespace ${n} for language ${i} failed`, r), !r && a && this.logger.log(`${t}loaded namespace ${n} for language ${i}`, a), this.loaded(e, r, a);
|
|
1146
1039
|
});
|
|
1147
1040
|
}
|
|
1148
|
-
saveMissing(e, t, s, i, r) {
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
if (this.services.utils && this.services.utils.hasLoadedNamespace && !this.services.utils.hasLoadedNamespace(t)) {
|
|
1041
|
+
saveMissing(e, t, s, i, n, r = {}, a = () => {
|
|
1042
|
+
}) {
|
|
1043
|
+
if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(t)) {
|
|
1152
1044
|
this.logger.warn(`did not save key "${s}" as the namespace "${t}" 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!!!");
|
|
1153
1045
|
return;
|
|
1154
1046
|
}
|
|
1155
1047
|
if (!(s == null || s === "")) {
|
|
1156
|
-
if (this.backend
|
|
1157
|
-
const
|
|
1158
|
-
...
|
|
1159
|
-
isUpdate:
|
|
1160
|
-
},
|
|
1161
|
-
if (
|
|
1048
|
+
if (this.backend?.create) {
|
|
1049
|
+
const u = {
|
|
1050
|
+
...r,
|
|
1051
|
+
isUpdate: n
|
|
1052
|
+
}, l = this.backend.create.bind(this.backend);
|
|
1053
|
+
if (l.length < 6)
|
|
1162
1054
|
try {
|
|
1163
|
-
let
|
|
1164
|
-
|
|
1165
|
-
} catch (
|
|
1166
|
-
|
|
1055
|
+
let c;
|
|
1056
|
+
l.length === 5 ? c = l(e, t, s, i, u) : c = l(e, t, s, i), c && typeof c.then == "function" ? c.then((h) => a(null, h)).catch(a) : a(null, c);
|
|
1057
|
+
} catch (c) {
|
|
1058
|
+
a(c);
|
|
1167
1059
|
}
|
|
1168
1060
|
else
|
|
1169
|
-
|
|
1061
|
+
l(e, t, s, i, a, u);
|
|
1170
1062
|
}
|
|
1171
1063
|
!e || !e[0] || this.store.addResource(e[0], t, s, i);
|
|
1172
1064
|
}
|
|
1173
1065
|
}
|
|
1174
1066
|
}
|
|
1175
|
-
const
|
|
1067
|
+
const Z = () => ({
|
|
1176
1068
|
debug: !1,
|
|
1177
|
-
|
|
1069
|
+
initAsync: !0,
|
|
1178
1070
|
ns: ["translation"],
|
|
1179
1071
|
defaultNS: ["translation"],
|
|
1180
1072
|
fallbackLng: ["dev"],
|
|
@@ -1183,11 +1075,11 @@ const oe = () => ({
|
|
|
1183
1075
|
nonExplicitSupportedLngs: !1,
|
|
1184
1076
|
load: "all",
|
|
1185
1077
|
preload: !1,
|
|
1186
|
-
simplifyPluralSuffix: !0,
|
|
1187
1078
|
keySeparator: ".",
|
|
1188
1079
|
nsSeparator: ":",
|
|
1189
1080
|
pluralSeparator: "_",
|
|
1190
1081
|
contextSeparator: "_",
|
|
1082
|
+
enableSelector: !1,
|
|
1191
1083
|
partialBundledLanguages: !1,
|
|
1192
1084
|
saveMissing: !1,
|
|
1193
1085
|
updateMissing: !1,
|
|
@@ -1205,10 +1097,10 @@ const oe = () => ({
|
|
|
1205
1097
|
parseMissingKeyHandler: !1,
|
|
1206
1098
|
appendNamespaceToMissingKey: !1,
|
|
1207
1099
|
appendNamespaceToCIMode: !1,
|
|
1208
|
-
overloadTranslationOptionHandler: (
|
|
1100
|
+
overloadTranslationOptionHandler: (o) => {
|
|
1209
1101
|
let e = {};
|
|
1210
|
-
if (typeof
|
|
1211
|
-
const t =
|
|
1102
|
+
if (typeof o[1] == "object" && (e = o[1]), d(o[1]) && (e.defaultValue = o[1]), d(o[2]) && (e.tDescription = o[2]), typeof o[2] == "object" || typeof o[3] == "object") {
|
|
1103
|
+
const t = o[3] || o[2];
|
|
1212
1104
|
Object.keys(t).forEach((s) => {
|
|
1213
1105
|
e[s] = t[s];
|
|
1214
1106
|
});
|
|
@@ -1217,7 +1109,6 @@ const oe = () => ({
|
|
|
1217
1109
|
},
|
|
1218
1110
|
interpolation: {
|
|
1219
1111
|
escapeValue: !0,
|
|
1220
|
-
format: (n) => n,
|
|
1221
1112
|
prefix: "{{",
|
|
1222
1113
|
suffix: "}}",
|
|
1223
1114
|
formatSeparator: ",",
|
|
@@ -1227,240 +1118,258 @@ const oe = () => ({
|
|
|
1227
1118
|
nestingOptionsSeparator: ",",
|
|
1228
1119
|
maxReplaces: 1e3,
|
|
1229
1120
|
skipOnVariables: !0
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
},
|
|
1233
|
-
|
|
1234
|
-
|
|
1121
|
+
},
|
|
1122
|
+
cacheInBuiltFormats: !0
|
|
1123
|
+
}), pe = (o) => (d(o.ns) && (o.ns = [o.ns]), d(o.fallbackLng) && (o.fallbackLng = [o.fallbackLng]), d(o.fallbackNS) && (o.fallbackNS = [o.fallbackNS]), o.supportedLngs && !o.supportedLngs.includes("cimode") && (o.supportedLngs = o.supportedLngs.concat(["cimode"])), o), J = () => {
|
|
1124
|
+
}, Ke = (o) => {
|
|
1125
|
+
Object.getOwnPropertyNames(Object.getPrototypeOf(o)).forEach((t) => {
|
|
1126
|
+
typeof o[t] == "function" && (o[t] = o[t].bind(o));
|
|
1235
1127
|
});
|
|
1236
1128
|
};
|
|
1237
|
-
class
|
|
1238
|
-
constructor() {
|
|
1239
|
-
|
|
1240
|
-
if (super(), this.options = le(e), this.services = {}, this.logger = N, this.modules = {
|
|
1129
|
+
class M extends Q {
|
|
1130
|
+
constructor(e = {}, t) {
|
|
1131
|
+
if (super(), this.options = pe(e), this.services = {}, this.logger = F, this.modules = {
|
|
1241
1132
|
external: []
|
|
1242
|
-
},
|
|
1243
|
-
if (!this.options.
|
|
1133
|
+
}, Ke(this), t && !this.isInitialized && !e.isClone) {
|
|
1134
|
+
if (!this.options.initAsync)
|
|
1244
1135
|
return this.init(e, t), this;
|
|
1245
1136
|
setTimeout(() => {
|
|
1246
1137
|
this.init(e, t);
|
|
1247
1138
|
}, 0);
|
|
1248
1139
|
}
|
|
1249
1140
|
}
|
|
1250
|
-
init() {
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
this.isInitializing = !0, typeof t == "function" && (s = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (d(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
|
|
1254
|
-
const i = oe();
|
|
1141
|
+
init(e = {}, t) {
|
|
1142
|
+
this.isInitializing = !0, typeof e == "function" && (t = e, e = {}), e.defaultNS == null && e.ns && (d(e.ns) ? e.defaultNS = e.ns : e.ns.includes("translation") || (e.defaultNS = e.ns[0]));
|
|
1143
|
+
const s = Z();
|
|
1255
1144
|
this.options = {
|
|
1256
|
-
...
|
|
1145
|
+
...s,
|
|
1257
1146
|
...this.options,
|
|
1258
|
-
...
|
|
1259
|
-
}, this.options.
|
|
1260
|
-
...
|
|
1147
|
+
...pe(e)
|
|
1148
|
+
}, this.options.interpolation = {
|
|
1149
|
+
...s.interpolation,
|
|
1261
1150
|
...this.options.interpolation
|
|
1262
|
-
}
|
|
1263
|
-
const
|
|
1151
|
+
}, e.keySeparator !== void 0 && (this.options.userDefinedKeySeparator = e.keySeparator), e.nsSeparator !== void 0 && (this.options.userDefinedNsSeparator = e.nsSeparator), typeof this.options.overloadTranslationOptionHandler != "function" && (this.options.overloadTranslationOptionHandler = s.overloadTranslationOptionHandler);
|
|
1152
|
+
const i = (l) => l ? typeof l == "function" ? new l() : l : null;
|
|
1264
1153
|
if (!this.options.isClone) {
|
|
1265
|
-
this.modules.logger ?
|
|
1266
|
-
let
|
|
1267
|
-
this.modules.formatter ?
|
|
1268
|
-
const
|
|
1269
|
-
this.store = new
|
|
1270
|
-
const
|
|
1271
|
-
|
|
1272
|
-
prepend: this.options.pluralSeparator
|
|
1273
|
-
|
|
1274
|
-
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
1275
|
-
}), h && (!this.options.interpolation.format || this.options.interpolation.format === i.interpolation.format) && (u.formatter = r(h), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new ke(this.options), u.utils = {
|
|
1154
|
+
this.modules.logger ? F.init(i(this.modules.logger), this.options) : F.init(null, this.options);
|
|
1155
|
+
let l;
|
|
1156
|
+
this.modules.formatter ? l = this.modules.formatter : l = Ie;
|
|
1157
|
+
const c = new le(this.options);
|
|
1158
|
+
this.store = new oe(this.options.resources, this.options);
|
|
1159
|
+
const h = this.services;
|
|
1160
|
+
h.logger = F, h.resourceStore = this.store, h.languageUtils = c, h.pluralResolver = new ke(c, {
|
|
1161
|
+
prepend: this.options.pluralSeparator
|
|
1162
|
+
}), l && (h.formatter = i(l), h.formatter.init && h.formatter.init(h, this.options), this.options.interpolation.format = h.formatter.format.bind(h.formatter)), h.interpolator = new fe(this.options), h.utils = {
|
|
1276
1163
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
1277
|
-
},
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
}), this.modules.
|
|
1282
|
-
|
|
1283
|
-
x[m - 1] = arguments[m];
|
|
1284
|
-
e.emit(c, ...x);
|
|
1285
|
-
}), this.modules.external.forEach((c) => {
|
|
1286
|
-
c.init && c.init(this);
|
|
1164
|
+
}, h.backendConnector = new Ae(i(this.modules.backend), h.resourceStore, h, this.options), h.backendConnector.on("*", (f, ...g) => {
|
|
1165
|
+
this.emit(f, ...g);
|
|
1166
|
+
}), this.modules.languageDetector && (h.languageDetector = i(this.modules.languageDetector), h.languageDetector.init && h.languageDetector.init(h, this.options.detection, this.options)), this.modules.i18nFormat && (h.i18nFormat = i(this.modules.i18nFormat), h.i18nFormat.init && h.i18nFormat.init(this)), this.translator = new Y(this.services, this.options), this.translator.on("*", (f, ...g) => {
|
|
1167
|
+
this.emit(f, ...g);
|
|
1168
|
+
}), this.modules.external.forEach((f) => {
|
|
1169
|
+
f.init && f.init(this);
|
|
1287
1170
|
});
|
|
1288
1171
|
}
|
|
1289
|
-
if (this.format = this.options.interpolation.format,
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1172
|
+
if (this.format = this.options.interpolation.format, t || (t = J), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
1173
|
+
const l = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
1174
|
+
l.length > 0 && l[0] !== "dev" && (this.options.lng = l[0]);
|
|
1292
1175
|
}
|
|
1293
|
-
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((
|
|
1294
|
-
this[
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((h) => {
|
|
1298
|
-
this[h] = function() {
|
|
1299
|
-
return e.store[h](...arguments), e;
|
|
1300
|
-
};
|
|
1176
|
+
!this.services.languageDetector && !this.options.lng && this.logger.warn("init: no languageDetector is used and no lng is defined"), ["getResource", "hasResourceBundle", "getResourceBundle", "getDataByLanguage"].forEach((l) => {
|
|
1177
|
+
this[l] = (...c) => this.store[l](...c);
|
|
1178
|
+
}), ["addResource", "addResources", "addResourceBundle", "removeResourceBundle"].forEach((l) => {
|
|
1179
|
+
this[l] = (...c) => (this.store[l](...c), this);
|
|
1301
1180
|
});
|
|
1302
|
-
const
|
|
1303
|
-
const
|
|
1304
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options),
|
|
1181
|
+
const a = H(), u = () => {
|
|
1182
|
+
const l = (c, h) => {
|
|
1183
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), a.resolve(h), t(c, h);
|
|
1305
1184
|
};
|
|
1306
|
-
if (this.languages
|
|
1307
|
-
this.changeLanguage(this.options.lng,
|
|
1185
|
+
if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return l(null, this.t.bind(this));
|
|
1186
|
+
this.changeLanguage(this.options.lng, l);
|
|
1308
1187
|
};
|
|
1309
|
-
return this.options.resources || !this.options.
|
|
1188
|
+
return this.options.resources || !this.options.initAsync ? u() : setTimeout(u, 0), a;
|
|
1310
1189
|
}
|
|
1311
|
-
loadResources(e) {
|
|
1312
|
-
let s =
|
|
1190
|
+
loadResources(e, t = J) {
|
|
1191
|
+
let s = t;
|
|
1313
1192
|
const i = d(e) ? e : this.language;
|
|
1314
1193
|
if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1315
|
-
if (i
|
|
1316
|
-
const
|
|
1317
|
-
if (!
|
|
1318
|
-
this.services.languageUtils.toResolveHierarchy(
|
|
1319
|
-
|
|
1194
|
+
if (i?.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
|
|
1195
|
+
const n = [], r = (a) => {
|
|
1196
|
+
if (!a || a === "cimode") return;
|
|
1197
|
+
this.services.languageUtils.toResolveHierarchy(a).forEach((l) => {
|
|
1198
|
+
l !== "cimode" && (n.includes(l) || n.push(l));
|
|
1320
1199
|
});
|
|
1321
1200
|
};
|
|
1322
|
-
i ?
|
|
1323
|
-
!
|
|
1201
|
+
i ? r(i) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((u) => r(u)), this.options.preload?.forEach?.((a) => r(a)), this.services.backendConnector.load(n, this.options.ns, (a) => {
|
|
1202
|
+
!a && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), s(a);
|
|
1324
1203
|
});
|
|
1325
1204
|
} else
|
|
1326
1205
|
s(null);
|
|
1327
1206
|
}
|
|
1328
1207
|
reloadResources(e, t, s) {
|
|
1329
|
-
const i =
|
|
1330
|
-
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s =
|
|
1331
|
-
i.resolve(), s(
|
|
1208
|
+
const i = H();
|
|
1209
|
+
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = J), this.services.backendConnector.reload(e, t, (n) => {
|
|
1210
|
+
i.resolve(), s(n);
|
|
1332
1211
|
}), i;
|
|
1333
1212
|
}
|
|
1334
1213
|
use(e) {
|
|
1335
1214
|
if (!e) throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");
|
|
1336
1215
|
if (!e.type) throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");
|
|
1337
|
-
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" &&
|
|
1216
|
+
return e.type === "backend" && (this.modules.backend = e), (e.type === "logger" || e.log && e.warn && e.error) && (this.modules.logger = e), e.type === "languageDetector" && (this.modules.languageDetector = e), e.type === "i18nFormat" && (this.modules.i18nFormat = e), e.type === "postProcessor" && me.addPostProcessor(e), e.type === "formatter" && (this.modules.formatter = e), e.type === "3rdParty" && this.modules.external.push(e), this;
|
|
1338
1217
|
}
|
|
1339
1218
|
setResolvedLanguage(e) {
|
|
1340
|
-
if (!(!e || !this.languages) && !
|
|
1219
|
+
if (!(!e || !this.languages) && !["cimode", "dev"].includes(e)) {
|
|
1341
1220
|
for (let t = 0; t < this.languages.length; t++) {
|
|
1342
1221
|
const s = this.languages[t];
|
|
1343
|
-
if (!
|
|
1222
|
+
if (!["cimode", "dev"].includes(s) && this.store.hasLanguageSomeTranslations(s)) {
|
|
1344
1223
|
this.resolvedLanguage = s;
|
|
1345
1224
|
break;
|
|
1346
1225
|
}
|
|
1347
1226
|
}
|
|
1227
|
+
!this.resolvedLanguage && !this.languages.includes(e) && this.store.hasLanguageSomeTranslations(e) && (this.resolvedLanguage = e, this.languages.unshift(e));
|
|
1228
|
+
}
|
|
1348
1229
|
}
|
|
1349
1230
|
changeLanguage(e, t) {
|
|
1350
|
-
var s = this;
|
|
1351
1231
|
this.isLanguageChangingTo = e;
|
|
1352
|
-
const
|
|
1232
|
+
const s = H();
|
|
1353
1233
|
this.emit("languageChanging", e);
|
|
1354
|
-
const
|
|
1355
|
-
this.language =
|
|
1356
|
-
},
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
!e && !l && this.services.languageDetector && (l = []);
|
|
1364
|
-
const f = d(l) ? l : this.services.languageUtils.getBestMatchFromCodes(l);
|
|
1365
|
-
f && (this.language || r(f), this.translator.language || this.translator.changeLanguage(f), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(f)), this.loadResources(f, (h) => {
|
|
1366
|
-
a(h, f);
|
|
1234
|
+
const i = (a) => {
|
|
1235
|
+
this.language = a, this.languages = this.services.languageUtils.toResolveHierarchy(a), this.resolvedLanguage = void 0, this.setResolvedLanguage(a);
|
|
1236
|
+
}, n = (a, u) => {
|
|
1237
|
+
u ? this.isLanguageChangingTo === e && (i(u), this.translator.changeLanguage(u), this.isLanguageChangingTo = void 0, this.emit("languageChanged", u), this.logger.log("languageChanged", u)) : this.isLanguageChangingTo = void 0, s.resolve((...l) => this.t(...l)), t && t(a, (...l) => this.t(...l));
|
|
1238
|
+
}, r = (a) => {
|
|
1239
|
+
!e && !a && this.services.languageDetector && (a = []);
|
|
1240
|
+
const u = d(a) ? a : a && a[0], l = this.store.hasLanguageSomeTranslations(u) ? u : this.services.languageUtils.getBestMatchFromCodes(d(a) ? [a] : a);
|
|
1241
|
+
l && (this.language || i(l), this.translator.language || this.translator.changeLanguage(l), this.services.languageDetector?.cacheUserLanguage?.(l)), this.loadResources(l, (c) => {
|
|
1242
|
+
n(c, l);
|
|
1367
1243
|
});
|
|
1368
1244
|
};
|
|
1369
|
-
return !e && this.services.languageDetector && !this.services.languageDetector.async ?
|
|
1245
|
+
return !e && this.services.languageDetector && !this.services.languageDetector.async ? r(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(r) : this.services.languageDetector.detect(r) : r(e), s;
|
|
1370
1246
|
}
|
|
1371
|
-
getFixedT(e, t, s) {
|
|
1372
|
-
|
|
1373
|
-
const r = function(a, o) {
|
|
1374
|
-
let l;
|
|
1375
|
-
if (typeof o != "object") {
|
|
1376
|
-
for (var f = arguments.length, h = new Array(f > 2 ? f - 2 : 0), g = 2; g < f; g++)
|
|
1377
|
-
h[g - 2] = arguments[g];
|
|
1378
|
-
l = i.options.overloadTranslationOptionHandler([a, o].concat(h));
|
|
1379
|
-
} else
|
|
1380
|
-
l = {
|
|
1381
|
-
...o
|
|
1382
|
-
};
|
|
1383
|
-
l.lng = l.lng || r.lng, l.lngs = l.lngs || r.lngs, l.ns = l.ns || r.ns, l.keyPrefix !== "" && (l.keyPrefix = l.keyPrefix || s || r.keyPrefix);
|
|
1384
|
-
const u = i.options.keySeparator || ".";
|
|
1247
|
+
getFixedT(e, t, s, i) {
|
|
1248
|
+
const n = i?.scopeNs, r = (a, u, ...l) => {
|
|
1385
1249
|
let c;
|
|
1386
|
-
|
|
1250
|
+
typeof u != "object" ? c = this.options.overloadTranslationOptionHandler([a, u].concat(l)) : c = {
|
|
1251
|
+
...u
|
|
1252
|
+
}, c.lng = c.lng || r.lng, c.lngs = c.lngs || r.lngs;
|
|
1253
|
+
const h = c.ns !== void 0 && c.ns !== null;
|
|
1254
|
+
c.ns = c.ns || r.ns, c.keyPrefix !== "" && (c.keyPrefix = c.keyPrefix || s || r.keyPrefix);
|
|
1255
|
+
const f = {
|
|
1256
|
+
...this.options,
|
|
1257
|
+
...c
|
|
1258
|
+
};
|
|
1259
|
+
Array.isArray(n) && !h && (f.ns = n), typeof c.keyPrefix == "function" && (c.keyPrefix = V(c.keyPrefix, f));
|
|
1260
|
+
const g = this.options.keySeparator || ".";
|
|
1261
|
+
let p;
|
|
1262
|
+
return c.keyPrefix && Array.isArray(a) ? p = a.map((m) => (typeof m == "function" && (m = V(m, f)), `${c.keyPrefix}${g}${m}`)) : (typeof a == "function" && (a = V(a, f)), p = c.keyPrefix ? `${c.keyPrefix}${g}${a}` : a), this.t(p, c);
|
|
1387
1263
|
};
|
|
1388
1264
|
return d(e) ? r.lng = e : r.lngs = e, r.ns = t, r.keyPrefix = s, r;
|
|
1389
1265
|
}
|
|
1390
|
-
t() {
|
|
1391
|
-
return this.translator
|
|
1266
|
+
t(...e) {
|
|
1267
|
+
return this.translator?.translate(...e);
|
|
1392
1268
|
}
|
|
1393
|
-
exists() {
|
|
1394
|
-
return this.translator
|
|
1269
|
+
exists(...e) {
|
|
1270
|
+
return this.translator?.exists(...e);
|
|
1395
1271
|
}
|
|
1396
1272
|
setDefaultNamespace(e) {
|
|
1397
1273
|
this.options.defaultNS = e;
|
|
1398
1274
|
}
|
|
1399
|
-
hasLoadedNamespace(e) {
|
|
1400
|
-
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1275
|
+
hasLoadedNamespace(e, t = {}) {
|
|
1401
1276
|
if (!this.isInitialized)
|
|
1402
1277
|
return this.logger.warn("hasLoadedNamespace: i18next was not initialized", this.languages), !1;
|
|
1403
1278
|
if (!this.languages || !this.languages.length)
|
|
1404
1279
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
1405
|
-
const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1,
|
|
1280
|
+
const s = t.lng || this.resolvedLanguage || this.languages[0], i = this.options ? this.options.fallbackLng : !1, n = this.languages[this.languages.length - 1];
|
|
1406
1281
|
if (s.toLowerCase() === "cimode") return !0;
|
|
1407
|
-
const
|
|
1408
|
-
const
|
|
1409
|
-
return
|
|
1282
|
+
const r = (l, c) => {
|
|
1283
|
+
const h = this.services.backendConnector.state[`${l}|${c}`];
|
|
1284
|
+
return h === -1 || h === 0 || h === 2;
|
|
1410
1285
|
};
|
|
1411
1286
|
if (t.precheck) {
|
|
1412
|
-
const
|
|
1413
|
-
if (
|
|
1287
|
+
const l = t.precheck(this, r);
|
|
1288
|
+
if (l !== void 0) return l;
|
|
1414
1289
|
}
|
|
1415
|
-
|
|
1290
|
+
if (this.hasResourceBundle(s, e) || !this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return !0;
|
|
1291
|
+
const {
|
|
1292
|
+
languageUtils: a
|
|
1293
|
+
} = this.services, u = t.lng ? a.isSupportedCode(s) && a.toResolveHierarchy(s, !1)[0] : s;
|
|
1294
|
+
return !!((!u || r(u, e)) && (!i || r(n, e)));
|
|
1416
1295
|
}
|
|
1417
1296
|
loadNamespaces(e, t) {
|
|
1418
|
-
const s =
|
|
1297
|
+
const s = H();
|
|
1419
1298
|
return this.options.ns ? (d(e) && (e = [e]), e.forEach((i) => {
|
|
1420
|
-
this.options.ns.
|
|
1299
|
+
this.options.ns.includes(i) || this.options.ns.push(i);
|
|
1421
1300
|
}), this.loadResources((i) => {
|
|
1422
1301
|
s.resolve(), t && t(i);
|
|
1423
1302
|
}), s) : (t && t(), Promise.resolve());
|
|
1424
1303
|
}
|
|
1425
1304
|
loadLanguages(e, t) {
|
|
1426
|
-
const s =
|
|
1305
|
+
const s = H();
|
|
1427
1306
|
d(e) && (e = [e]);
|
|
1428
|
-
const i = this.options.preload || [],
|
|
1429
|
-
return
|
|
1430
|
-
s.resolve(), t && t(
|
|
1307
|
+
const i = this.options.preload || [], n = e.filter((r) => !i.includes(r) && this.services.languageUtils.isSupportedCode(r));
|
|
1308
|
+
return n.length ? (this.options.preload = i.concat(n), this.loadResources((r) => {
|
|
1309
|
+
s.resolve(), t && t(r);
|
|
1431
1310
|
}), s) : (t && t(), Promise.resolve());
|
|
1432
1311
|
}
|
|
1433
1312
|
dir(e) {
|
|
1434
|
-
if (e || (e = this.resolvedLanguage || (this.languages
|
|
1435
|
-
|
|
1436
|
-
|
|
1313
|
+
if (e || (e = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language)), !e) return "rtl";
|
|
1314
|
+
try {
|
|
1315
|
+
const i = new Intl.Locale(e);
|
|
1316
|
+
if (i && i.getTextInfo) {
|
|
1317
|
+
const n = i.getTextInfo();
|
|
1318
|
+
if (n && n.direction) return n.direction;
|
|
1319
|
+
}
|
|
1320
|
+
} catch {
|
|
1321
|
+
}
|
|
1322
|
+
const 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"], s = this.services?.languageUtils || new le(Z());
|
|
1323
|
+
return e.toLowerCase().indexOf("-latn") > 1 ? "ltr" : t.includes(s.getLanguagePartFromCode(e)) || e.toLowerCase().indexOf("-arab") > 1 ? "rtl" : "ltr";
|
|
1437
1324
|
}
|
|
1438
|
-
static createInstance() {
|
|
1439
|
-
|
|
1440
|
-
return
|
|
1325
|
+
static createInstance(e = {}, t) {
|
|
1326
|
+
const s = new M(e, t);
|
|
1327
|
+
return s.createInstance = M.createInstance, s;
|
|
1441
1328
|
}
|
|
1442
|
-
cloneInstance() {
|
|
1443
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : U;
|
|
1329
|
+
cloneInstance(e = {}, t = J) {
|
|
1444
1330
|
const s = e.forkResourceStore;
|
|
1445
|
-
s &&
|
|
1331
|
+
s && (e = {
|
|
1332
|
+
...e
|
|
1333
|
+
}, delete e.forkResourceStore);
|
|
1446
1334
|
const i = {
|
|
1447
1335
|
...this.options,
|
|
1336
|
+
preload: !1,
|
|
1448
1337
|
...e,
|
|
1449
1338
|
isClone: !0
|
|
1450
|
-
},
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
}),
|
|
1339
|
+
}, n = new M(i);
|
|
1340
|
+
if ((e.debug !== void 0 || e.prefix !== void 0) && (n.logger = n.logger.clone(e)), ["store", "services", "language"].forEach((a) => {
|
|
1341
|
+
n[a] = this[a];
|
|
1342
|
+
}), n.services = {
|
|
1454
1343
|
...this.services
|
|
1455
|
-
},
|
|
1456
|
-
hasLoadedNamespace:
|
|
1457
|
-
}, s
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1344
|
+
}, n.services.utils = {
|
|
1345
|
+
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1346
|
+
}, s) {
|
|
1347
|
+
const a = (l) => {
|
|
1348
|
+
const c = Array.isArray(l) ? [...l] : {
|
|
1349
|
+
...l
|
|
1350
|
+
};
|
|
1351
|
+
return Object.keys(c).forEach((h) => {
|
|
1352
|
+
c[h] && typeof c[h] == "object" && (c[h] = a(c[h]));
|
|
1353
|
+
}), c;
|
|
1354
|
+
}, u = a(this.store.data);
|
|
1355
|
+
n.store = new oe(u, i), n.services.resourceStore = n.store;
|
|
1356
|
+
}
|
|
1357
|
+
if (e.interpolation) {
|
|
1358
|
+
const u = {
|
|
1359
|
+
...Z().interpolation,
|
|
1360
|
+
...this.options.interpolation,
|
|
1361
|
+
...e.interpolation
|
|
1362
|
+
}, l = {
|
|
1363
|
+
...i,
|
|
1364
|
+
interpolation: u
|
|
1365
|
+
};
|
|
1366
|
+
n.services.interpolator = new fe(l);
|
|
1367
|
+
}
|
|
1368
|
+
return n.translator = new Y(n.services, i), n.translator.on("*", (a, ...u) => {
|
|
1369
|
+
n.emit(a, ...u);
|
|
1370
|
+
}), n.init(i, t), n.translator.options = i, n.translator.backendConnector.services.utils = {
|
|
1371
|
+
hasLoadedNamespace: n.hasLoadedNamespace.bind(n)
|
|
1372
|
+
}, n;
|
|
1464
1373
|
}
|
|
1465
1374
|
toJSON() {
|
|
1466
1375
|
return {
|
|
@@ -1472,23 +1381,23 @@ class V extends B {
|
|
|
1472
1381
|
};
|
|
1473
1382
|
}
|
|
1474
1383
|
}
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
L.loadLanguages;
|
|
1384
|
+
const O = M.createInstance();
|
|
1385
|
+
O.createInstance;
|
|
1386
|
+
O.dir;
|
|
1387
|
+
O.init;
|
|
1388
|
+
O.loadResources;
|
|
1389
|
+
O.reloadResources;
|
|
1390
|
+
O.use;
|
|
1391
|
+
O.changeLanguage;
|
|
1392
|
+
O.getFixedT;
|
|
1393
|
+
O.t;
|
|
1394
|
+
O.exists;
|
|
1395
|
+
O.setDefaultNamespace;
|
|
1396
|
+
O.hasLoadedNamespace;
|
|
1397
|
+
O.loadNamespaces;
|
|
1398
|
+
O.loadLanguages;
|
|
1491
1399
|
export {
|
|
1492
|
-
|
|
1400
|
+
O as default,
|
|
1401
|
+
V as keyFromSelector
|
|
1493
1402
|
};
|
|
1494
1403
|
//# sourceMappingURL=i18next.es.js.map
|