@bleedingdev/modern-js-plugin-i18n 3.5.0-ultramodern.6 → 3.5.0-ultramodern.75

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.
Files changed (221) hide show
  1. package/dist/cjs/cli/index.js +2 -1
  2. package/dist/cjs/cli/locales.js +15 -15
  3. package/dist/cjs/runtime/Link.js +8 -89
  4. package/dist/cjs/runtime/context.js +78 -91
  5. package/dist/cjs/runtime/contextHelpers.js +143 -0
  6. package/dist/cjs/runtime/core.js +32 -132
  7. package/dist/cjs/runtime/hooks.js +54 -21
  8. package/dist/cjs/runtime/i18n/backend/defaults.node.js +7 -7
  9. package/dist/cjs/runtime/i18n/detection/cache.js +150 -0
  10. package/dist/cjs/runtime/i18n/detection/detector.js +100 -0
  11. package/dist/cjs/runtime/i18n/detection/index.js +8 -263
  12. package/dist/cjs/runtime/i18n/detection/initOptions.js +69 -0
  13. package/dist/cjs/runtime/i18n/detection/language.js +62 -0
  14. package/dist/cjs/runtime/i18n/detection/path.js +49 -0
  15. package/dist/cjs/runtime/i18n/detection/priority.js +66 -0
  16. package/dist/cjs/runtime/i18n/detection/ssr.js +70 -0
  17. package/dist/cjs/runtime/i18n/detection/types.js +18 -0
  18. package/dist/cjs/runtime/i18n/instance.js +34 -10
  19. package/dist/cjs/runtime/linkHelpers.js +148 -0
  20. package/dist/cjs/runtime/pluginSetup.js +102 -0
  21. package/dist/cjs/runtime/providerComposition.js +115 -0
  22. package/dist/cjs/runtime/reactI18next.js +43 -0
  23. package/dist/cjs/runtime/routerAdapter.js +16 -8
  24. package/dist/cjs/runtime/utils.js +1 -9
  25. package/dist/cjs/server/apiPrefix.js +72 -0
  26. package/dist/cjs/server/detectorOptions.js +97 -0
  27. package/dist/cjs/server/index.js +17 -144
  28. package/dist/cjs/server/redirectPolicy.js +96 -0
  29. package/dist/cjs/shared/detection.js +2 -104
  30. package/dist/cjs/shared/localisedUrls/config.js +49 -0
  31. package/dist/cjs/shared/localisedUrls/index.js +91 -0
  32. package/dist/cjs/shared/localisedUrls/normalise.js +87 -0
  33. package/dist/cjs/shared/localisedUrls/pathname.js +68 -0
  34. package/dist/cjs/shared/localisedUrls/patterns.js +130 -0
  35. package/dist/cjs/shared/localisedUrls/redirect.js +103 -0
  36. package/dist/cjs/shared/localisedUrls/resolve.js +88 -0
  37. package/dist/cjs/shared/localisedUrls/routes.js +130 -0
  38. package/dist/cjs/shared/localisedUrls/types.js +18 -0
  39. package/dist/cjs/shared/localisedUrls.js +28 -294
  40. package/dist/cjs/shared/utils.js +2 -8
  41. package/dist/esm/cli/index.mjs +2 -1
  42. package/dist/esm/cli/locales.mjs +13 -13
  43. package/dist/esm/runtime/Link.mjs +1 -82
  44. package/dist/esm/runtime/context.mjs +76 -92
  45. package/dist/esm/runtime/contextHelpers.mjs +87 -0
  46. package/dist/esm/runtime/core.mjs +30 -133
  47. package/dist/esm/runtime/hooks.mjs +56 -23
  48. package/dist/esm/runtime/i18n/backend/defaults.node.mjs +5 -5
  49. package/dist/esm/runtime/i18n/detection/cache.mjs +103 -0
  50. package/dist/esm/runtime/i18n/detection/detector.mjs +62 -0
  51. package/dist/esm/runtime/i18n/detection/index.mjs +4 -260
  52. package/dist/esm/runtime/i18n/detection/initOptions.mjs +28 -0
  53. package/dist/esm/runtime/i18n/detection/language.mjs +21 -0
  54. package/dist/esm/runtime/i18n/detection/path.mjs +11 -0
  55. package/dist/esm/runtime/i18n/detection/priority.mjs +28 -0
  56. package/dist/esm/runtime/i18n/detection/ssr.mjs +26 -0
  57. package/dist/esm/runtime/i18n/detection/types.mjs +0 -0
  58. package/dist/esm/runtime/i18n/instance.mjs +35 -8
  59. package/dist/esm/runtime/linkHelpers.mjs +98 -0
  60. package/dist/esm/runtime/pluginSetup.mjs +64 -0
  61. package/dist/esm/runtime/providerComposition.mjs +77 -0
  62. package/dist/esm/runtime/reactI18next.mjs +5 -0
  63. package/dist/esm/runtime/routerAdapter.mjs +16 -8
  64. package/dist/esm/runtime/utils.mjs +2 -10
  65. package/dist/esm/server/apiPrefix.mjs +31 -0
  66. package/dist/esm/server/detectorOptions.mjs +59 -0
  67. package/dist/esm/server/index.mjs +8 -135
  68. package/dist/esm/server/redirectPolicy.mjs +46 -0
  69. package/dist/esm/shared/detection.mjs +1 -71
  70. package/dist/esm/shared/localisedUrls/config.mjs +11 -0
  71. package/dist/esm/shared/localisedUrls/index.mjs +7 -0
  72. package/dist/esm/shared/localisedUrls/normalise.mjs +37 -0
  73. package/dist/esm/shared/localisedUrls/pathname.mjs +24 -0
  74. package/dist/esm/shared/localisedUrls/patterns.mjs +86 -0
  75. package/dist/esm/shared/localisedUrls/redirect.mjs +56 -0
  76. package/dist/esm/shared/localisedUrls/resolve.mjs +47 -0
  77. package/dist/esm/shared/localisedUrls/routes.mjs +89 -0
  78. package/dist/esm/shared/localisedUrls/types.mjs +0 -0
  79. package/dist/esm/shared/localisedUrls.mjs +1 -283
  80. package/dist/esm/shared/utils.mjs +1 -1
  81. package/dist/esm-node/cli/index.mjs +2 -1
  82. package/dist/esm-node/cli/locales.mjs +13 -13
  83. package/dist/esm-node/runtime/Link.mjs +1 -82
  84. package/dist/esm-node/runtime/context.mjs +76 -92
  85. package/dist/esm-node/runtime/contextHelpers.mjs +88 -0
  86. package/dist/esm-node/runtime/core.mjs +30 -133
  87. package/dist/esm-node/runtime/hooks.mjs +56 -23
  88. package/dist/esm-node/runtime/i18n/backend/defaults.node.mjs +5 -5
  89. package/dist/esm-node/runtime/i18n/detection/cache.mjs +104 -0
  90. package/dist/esm-node/runtime/i18n/detection/detector.mjs +63 -0
  91. package/dist/esm-node/runtime/i18n/detection/index.mjs +4 -260
  92. package/dist/esm-node/runtime/i18n/detection/initOptions.mjs +29 -0
  93. package/dist/esm-node/runtime/i18n/detection/language.mjs +22 -0
  94. package/dist/esm-node/runtime/i18n/detection/path.mjs +12 -0
  95. package/dist/esm-node/runtime/i18n/detection/priority.mjs +29 -0
  96. package/dist/esm-node/runtime/i18n/detection/ssr.mjs +27 -0
  97. package/dist/esm-node/runtime/i18n/detection/types.mjs +1 -0
  98. package/dist/esm-node/runtime/i18n/instance.mjs +35 -8
  99. package/dist/esm-node/runtime/linkHelpers.mjs +99 -0
  100. package/dist/esm-node/runtime/pluginSetup.mjs +65 -0
  101. package/dist/esm-node/runtime/providerComposition.mjs +78 -0
  102. package/dist/esm-node/runtime/reactI18next.mjs +6 -0
  103. package/dist/esm-node/runtime/routerAdapter.mjs +16 -8
  104. package/dist/esm-node/runtime/utils.mjs +2 -10
  105. package/dist/esm-node/server/apiPrefix.mjs +32 -0
  106. package/dist/esm-node/server/detectorOptions.mjs +60 -0
  107. package/dist/esm-node/server/index.mjs +8 -135
  108. package/dist/esm-node/server/redirectPolicy.mjs +47 -0
  109. package/dist/esm-node/shared/detection.mjs +1 -71
  110. package/dist/esm-node/shared/localisedUrls/config.mjs +12 -0
  111. package/dist/esm-node/shared/localisedUrls/index.mjs +8 -0
  112. package/dist/esm-node/shared/localisedUrls/normalise.mjs +38 -0
  113. package/dist/esm-node/shared/localisedUrls/pathname.mjs +25 -0
  114. package/dist/esm-node/shared/localisedUrls/patterns.mjs +87 -0
  115. package/dist/esm-node/shared/localisedUrls/redirect.mjs +57 -0
  116. package/dist/esm-node/shared/localisedUrls/resolve.mjs +48 -0
  117. package/dist/esm-node/shared/localisedUrls/routes.mjs +90 -0
  118. package/dist/esm-node/shared/localisedUrls/types.mjs +1 -0
  119. package/dist/esm-node/shared/localisedUrls.mjs +1 -283
  120. package/dist/esm-node/shared/utils.mjs +1 -1
  121. package/dist/types/cli/locales.d.ts +1 -1
  122. package/dist/types/runtime/Link.d.ts +3 -7
  123. package/dist/types/runtime/context.d.ts +21 -5
  124. package/dist/types/runtime/contextHelpers.d.ts +29 -0
  125. package/dist/types/runtime/core.d.ts +4 -8
  126. package/dist/types/runtime/hooks.d.ts +3 -7
  127. package/dist/types/runtime/i18n/backend/middleware.common.d.ts +2 -1
  128. package/dist/types/runtime/i18n/detection/cache.d.ts +14 -0
  129. package/dist/types/runtime/i18n/detection/detector.d.ts +8 -0
  130. package/dist/types/runtime/i18n/detection/index.d.ts +5 -50
  131. package/dist/types/runtime/i18n/detection/initOptions.d.ts +10 -0
  132. package/dist/types/runtime/i18n/detection/language.d.ts +11 -0
  133. package/dist/types/runtime/i18n/detection/middleware.d.ts +4 -4
  134. package/dist/types/runtime/i18n/detection/middleware.node.d.ts +4 -4
  135. package/dist/types/runtime/i18n/detection/path.d.ts +5 -0
  136. package/dist/types/runtime/i18n/detection/priority.d.ts +10 -0
  137. package/dist/types/runtime/i18n/detection/ssr.d.ts +9 -0
  138. package/dist/types/runtime/i18n/detection/types.d.ts +32 -0
  139. package/dist/types/runtime/i18n/instance.d.ts +31 -27
  140. package/dist/types/runtime/i18n/react-i18next.d.ts +1 -6
  141. package/dist/types/runtime/i18n/utils.d.ts +14 -5
  142. package/dist/types/runtime/linkHelpers.d.ts +17 -0
  143. package/dist/types/runtime/pluginSetup.d.ts +32 -0
  144. package/dist/types/runtime/providerComposition.d.ts +16 -0
  145. package/dist/types/runtime/reactI18next.d.ts +7 -0
  146. package/dist/types/runtime/routerAdapter.d.ts +7 -6
  147. package/dist/types/runtime/utils.d.ts +7 -2
  148. package/dist/types/server/apiPrefix.d.ts +7 -0
  149. package/dist/types/server/detectorOptions.d.ts +21 -0
  150. package/dist/types/server/index.d.ts +1 -6
  151. package/dist/types/server/redirectPolicy.d.ts +22 -0
  152. package/dist/types/shared/detection.d.ts +1 -11
  153. package/dist/types/shared/localisedUrls/config.d.ts +9 -0
  154. package/dist/types/shared/localisedUrls/index.d.ts +9 -0
  155. package/dist/types/shared/localisedUrls/normalise.d.ts +10 -0
  156. package/dist/types/shared/localisedUrls/pathname.d.ts +4 -0
  157. package/dist/types/shared/localisedUrls/patterns.d.ts +5 -0
  158. package/dist/types/shared/localisedUrls/redirect.d.ts +11 -0
  159. package/dist/types/shared/localisedUrls/resolve.d.ts +7 -0
  160. package/dist/types/shared/localisedUrls/routes.d.ts +3 -0
  161. package/dist/types/shared/localisedUrls/types.d.ts +14 -0
  162. package/dist/types/shared/localisedUrls.d.ts +2 -36
  163. package/dist/types/shared/utils.d.ts +0 -2
  164. package/package.json +17 -20
  165. package/rstest.config.mts +8 -1
  166. package/src/cli/index.ts +5 -4
  167. package/src/cli/locales.ts +3 -3
  168. package/src/runtime/Link.tsx +11 -138
  169. package/src/runtime/context.tsx +170 -207
  170. package/src/runtime/contextHelpers.ts +242 -0
  171. package/src/runtime/core.tsx +48 -275
  172. package/src/runtime/hooks.ts +86 -24
  173. package/src/runtime/i18n/backend/defaults.node.ts +2 -2
  174. package/src/runtime/i18n/backend/middleware.common.ts +5 -4
  175. package/src/runtime/i18n/detection/cache.ts +189 -0
  176. package/src/runtime/i18n/detection/detector.ts +166 -0
  177. package/src/runtime/i18n/detection/index.ts +10 -641
  178. package/src/runtime/i18n/detection/initOptions.ts +74 -0
  179. package/src/runtime/i18n/detection/language.ts +64 -0
  180. package/src/runtime/i18n/detection/middleware.node.ts +26 -7
  181. package/src/runtime/i18n/detection/middleware.ts +15 -7
  182. package/src/runtime/i18n/detection/path.ts +41 -0
  183. package/src/runtime/i18n/detection/priority.ts +82 -0
  184. package/src/runtime/i18n/detection/ssr.ts +47 -0
  185. package/src/runtime/i18n/detection/types.ts +41 -0
  186. package/src/runtime/i18n/instance.ts +98 -34
  187. package/src/runtime/i18n/react-i18next.ts +1 -6
  188. package/src/runtime/i18n/utils.ts +18 -9
  189. package/src/runtime/linkHelpers.ts +174 -0
  190. package/src/runtime/pluginSetup.ts +189 -0
  191. package/src/runtime/providerComposition.tsx +148 -0
  192. package/src/runtime/reactI18next.ts +20 -0
  193. package/src/runtime/routerAdapter.tsx +36 -15
  194. package/src/runtime/utils.ts +13 -35
  195. package/src/server/apiPrefix.ts +67 -0
  196. package/src/server/detectorOptions.ts +105 -0
  197. package/src/server/index.ts +14 -319
  198. package/src/server/redirectPolicy.ts +127 -0
  199. package/src/shared/detection.ts +1 -1
  200. package/src/shared/localisedUrls/config.ts +18 -0
  201. package/src/shared/localisedUrls/index.ts +24 -0
  202. package/src/shared/localisedUrls/normalise.ts +67 -0
  203. package/src/shared/localisedUrls/pathname.ts +60 -0
  204. package/src/shared/localisedUrls/patterns.ts +160 -0
  205. package/src/shared/localisedUrls/redirect.ts +93 -0
  206. package/src/shared/localisedUrls/resolve.ts +135 -0
  207. package/src/shared/localisedUrls/routes.ts +234 -0
  208. package/src/shared/localisedUrls/types.ts +18 -0
  209. package/src/shared/localisedUrls.ts +26 -623
  210. package/src/shared/utils.ts +2 -2
  211. package/tests/federatedI18nBoundary.client.test.tsx +112 -0
  212. package/tests/federatedI18nBoundary.test.tsx +120 -0
  213. package/tests/fixtures/localised-routes.golden.json +156 -0
  214. package/tests/link.test.tsx +111 -0
  215. package/tests/localisedUrlRewriteMatrix.fork.test.ts +147 -0
  216. package/tests/localisedUrls.test.ts +148 -2
  217. package/tests/reactI18nextRuntimeBoundary.test.ts +6 -3
  218. package/tests/redirectPolicy.test.ts +45 -0
  219. package/tests/routerAdapter.test.tsx +603 -0
  220. package/tests/type-fixture/fixture-globals.d.ts +11 -0
  221. package/tests/type-fixture/tsconfig.json +1 -0
@@ -28,6 +28,7 @@ var __webpack_require__ = {};
28
28
  var __webpack_exports__ = {};
29
29
  __webpack_require__.r(__webpack_exports__);
30
30
  __webpack_require__.d(__webpack_exports__, {
31
+ FederatedI18nBoundary: ()=>external_context_js_namespaceObject.FederatedI18nBoundary,
31
32
  I18nLink: ()=>external_I18nLink_js_namespaceObject.I18nLink,
32
33
  Link: ()=>external_Link_js_namespaceObject.Link,
33
34
  buildLocalizedUrl: ()=>external_utils_js_namespaceObject.buildLocalizedUrl,
@@ -39,37 +40,15 @@ __webpack_require__.d(__webpack_exports__, {
39
40
  useLocalizedPaths: ()=>external_localizedPaths_js_namespaceObject.useLocalizedPaths,
40
41
  useModernI18n: ()=>external_context_js_namespaceObject.useModernI18n
41
42
  });
42
- const jsx_runtime_namespaceObject = require("react/jsx-runtime");
43
- const runtime_namespaceObject = require("@modern-js/runtime");
44
- const head_namespaceObject = require("@modern-js/runtime/head");
45
- const merge_namespaceObject = require("@modern-js/runtime-utils/merge");
46
- const external_react_namespaceObject = require("react");
47
- const external_context_js_namespaceObject = require("./context.js");
48
- const external_hooks_js_namespaceObject = require("./hooks.js");
49
- const index_js_namespaceObject = require("./i18n/index.js");
50
- const backend_index_js_namespaceObject = require("./i18n/backend/index.js");
51
- const detection_index_js_namespaceObject = require("./i18n/detection/index.js");
52
- const middleware_js_namespaceObject = require("./i18n/detection/middleware.js");
53
- const instance_js_namespaceObject = require("./i18n/instance.js");
54
- const external_utils_js_namespaceObject = require("./utils.js");
43
+ const external_pluginSetup_js_namespaceObject = require("./pluginSetup.js");
44
+ const external_providerComposition_js_namespaceObject = require("./providerComposition.js");
45
+ const external_reactI18next_js_namespaceObject = require("./reactI18next.js");
55
46
  require("./types.js");
47
+ const external_context_js_namespaceObject = require("./context.js");
56
48
  const external_I18nLink_js_namespaceObject = require("./I18nLink.js");
57
49
  const external_Link_js_namespaceObject = require("./Link.js");
58
50
  const external_localizedPaths_js_namespaceObject = require("./localizedPaths.js");
59
- let i18nLifecycleHelpersPromise;
60
- function loadI18nLifecycleHelpers() {
61
- i18nLifecycleHelpersPromise ??= Promise.all([
62
- import("./i18n/backend/middleware.js"),
63
- import("./i18n/utils.js")
64
- ]).then(([backendMiddleware, utils])=>({
65
- useI18nextBackend: backendMiddleware.useI18nextBackend,
66
- changeI18nLanguage: utils.changeI18nLanguage,
67
- ensureLanguageMatch: utils.ensureLanguageMatch,
68
- initializeI18nInstance: utils.initializeI18nInstance,
69
- setupClonedInstance: utils.setupClonedInstance
70
- }));
71
- return i18nLifecycleHelpersPromise;
72
- }
51
+ const external_utils_js_namespaceObject = require("./utils.js");
73
52
  const createI18nPlugin = (loadReactI18nextIntegration)=>(options)=>({
74
53
  name: '@modern-js/plugin-i18n',
75
54
  setup: (api)=>{
@@ -78,118 +57,38 @@ const createI18nPlugin = (loadReactI18nextIntegration)=>(options)=>({
78
57
  const { enabled: backendEnabled = false } = backend || {};
79
58
  let latestI18nInstance;
80
59
  let I18nextProvider;
81
- const resolveReactI18nextIntegration = async ()=>{
82
- if (!reactI18next) return null;
83
- return loadReactI18nextIntegration?.() ?? null;
84
- };
85
60
  api.onBeforeRender(async (context)=>{
86
- const { useI18nextBackend, changeI18nLanguage, ensureLanguageMatch, initializeI18nInstance, setupClonedInstance } = await loadI18nLifecycleHelpers();
87
- let i18nInstance = await (0, index_js_namespaceObject.getI18nInstance)(userI18nInstance);
88
- const { i18n: otherConfig } = api.getRuntimeConfig();
89
- const { initOptions: otherInitOptions } = otherConfig || {};
90
- const userInitOptions = (0, merge_namespaceObject.merge)(otherInitOptions || {}, initOptions || {});
91
- const reactI18nextIntegration = await resolveReactI18nextIntegration();
92
- I18nextProvider = reactI18nextIntegration?.I18nextProvider ?? null;
93
- if (reactI18nextIntegration?.initReactI18next) i18nInstance.use(reactI18nextIntegration.initReactI18next);
94
- const pathname = (0, external_utils_js_namespaceObject.getPathname)(context);
95
- if (i18nextDetector) (0, middleware_js_namespaceObject.useI18nextLanguageDetector)(i18nInstance);
96
- const mergedDetection = (0, detection_index_js_namespaceObject.mergeDetectionOptions)(i18nextDetector, detection, localePathRedirect, userInitOptions);
97
- const mergedBackend = (0, backend_index_js_namespaceObject.mergeBackendOptions)(backend, userInitOptions);
98
- const hasSdkConfig = 'function' == typeof userInitOptions?.backend?.sdk || mergedBackend?.sdk && 'function' == typeof mergedBackend.sdk;
99
- if (mergedBackend && (backendEnabled || hasSdkConfig)) useI18nextBackend(i18nInstance, mergedBackend);
100
- const { finalLanguage } = await (0, detection_index_js_namespaceObject.detectLanguageWithPriority)(i18nInstance, {
101
- languages,
102
- fallbackLanguage,
103
- localePathRedirect,
61
+ latestI18nInstance = await (0, external_pluginSetup_js_namespaceObject.setupI18nBeforeRender)(context, {
62
+ api,
63
+ userI18nInstance,
64
+ initOptions,
65
+ backend,
66
+ backendEnabled,
104
67
  i18nextDetector,
105
68
  detection,
106
- userInitOptions,
107
- mergedBackend,
108
- pathname,
109
- ssrContext: context.ssrContext
110
- });
111
- await initializeI18nInstance(i18nInstance, finalLanguage, fallbackLanguage, languages, mergedDetection, mergedBackend, userInitOptions);
112
- if (!(0, runtime_namespaceObject.isBrowser)() && i18nInstance.cloneInstance) {
113
- i18nInstance = i18nInstance.cloneInstance();
114
- await setupClonedInstance(i18nInstance, finalLanguage, fallbackLanguage, languages, backendEnabled, backend, i18nextDetector, detection, localePathRedirect, userInitOptions);
115
- }
116
- if (localePathRedirect) await ensureLanguageMatch(i18nInstance, finalLanguage);
117
- if (!(0, runtime_namespaceObject.isBrowser)()) (0, detection_index_js_namespaceObject.exportServerLngToWindow)(context, finalLanguage);
118
- context.i18nInstance = i18nInstance;
119
- latestI18nInstance = i18nInstance;
120
- context.changeLanguage = async (newLang)=>{
121
- await changeI18nLanguage(i18nInstance, newLang, {
122
- detectionOptions: mergedDetection
123
- });
124
- };
125
- });
126
- api.wrapRoot((App)=>(props)=>{
127
- const runtimeContext = (0, external_react_namespaceObject.useContext)(runtime_namespaceObject.RuntimeContext);
128
- const i18nInstance = runtimeContext.i18nInstance || latestI18nInstance;
129
- const initialLang = (0, external_react_namespaceObject.useMemo)(()=>i18nInstance?.language || (localeDetection?.fallbackLanguage ?? 'en'), [
130
- i18nInstance?.language,
131
- localeDetection?.fallbackLanguage
132
- ]);
133
- const [lang, setLang] = (0, external_react_namespaceObject.useState)(initialLang);
134
- const [forceUpdate, setForceUpdate] = (0, external_react_namespaceObject.useState)(0);
135
- const prevLangRef = (0, external_react_namespaceObject.useRef)(lang);
136
- const runtimeContextRef = (0, external_react_namespaceObject.useRef)(runtimeContext);
137
- runtimeContextRef.current = runtimeContext;
138
- (0, external_react_namespaceObject.useEffect)(()=>{
139
- if (i18nInstance?.language) {
140
- const translator = i18nInstance.translator;
141
- if (translator) translator.language = i18nInstance.language;
142
- }
143
- }, [
144
- i18nInstance?.language
145
- ]);
146
- (0, external_react_namespaceObject.useEffect)(()=>{
147
- prevLangRef.current = lang;
148
- }, [
149
- lang
150
- ]);
151
- (0, external_hooks_js_namespaceObject.useSdkResourcesLoader)(i18nInstance, setForceUpdate);
152
- (0, external_hooks_js_namespaceObject.useLanguageSync)(i18nInstance, localePathRedirect, languages, runtimeContextRef, prevLangRef, setLang);
153
- (0, external_hooks_js_namespaceObject.useClientSideRedirect)(i18nInstance, localePathRedirect, languages, fallbackLanguage, ignoreRedirectRoutes, localisedUrls);
154
- const contextValue = (0, external_react_namespaceObject.useMemo)(()=>(0, external_hooks_js_namespaceObject.createContextValue)(lang, i18nInstance, entryName, languages, localePathRedirect, ignoreRedirectRoutes, localisedUrls, setLang), [
155
- lang,
156
- i18nInstance,
157
- entryName,
158
- languages,
159
- localePathRedirect,
160
- ignoreRedirectRoutes,
161
- localisedUrls,
162
- forceUpdate
163
- ]);
164
- const children = props.children;
165
- const appContent = /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
166
- children: [
167
- Boolean(htmlLangAttr) && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(head_namespaceObject.Helmet, {
168
- htmlAttributes: {
169
- lang
170
- }
171
- }),
172
- /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_context_js_namespaceObject.ModernI18nProvider, {
173
- value: contextValue,
174
- children: App ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(App, {
175
- ...props,
176
- children: children
177
- }) : children
178
- })
179
- ]
180
- });
181
- if (!i18nInstance) return appContent;
182
- if (I18nextProvider) {
183
- const i18nextInstanceForProvider = (0, instance_js_namespaceObject.getI18nextInstanceForProvider)(i18nInstance);
184
- return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(I18nextProvider, {
185
- i18n: i18nextInstanceForProvider,
186
- children: appContent
187
- });
69
+ localePathRedirect,
70
+ languages,
71
+ fallbackLanguage,
72
+ resolveReactI18nextIntegration: ()=>(0, external_reactI18next_js_namespaceObject.resolveReactI18nextIntegration)(reactI18next, loadReactI18nextIntegration),
73
+ setI18nextProvider: (provider)=>{
74
+ I18nextProvider = provider;
188
75
  }
189
- return appContent;
190
76
  });
77
+ });
78
+ api.wrapRoot((0, external_providerComposition_js_namespaceObject.createI18nRootWrapper)({
79
+ entryName,
80
+ htmlLangAttr,
81
+ localePathRedirect,
82
+ languages,
83
+ fallbackLanguage,
84
+ ignoreRedirectRoutes,
85
+ localisedUrls,
86
+ getLatestI18nInstance: ()=>latestI18nInstance,
87
+ getI18nextProvider: ()=>I18nextProvider
88
+ }));
191
89
  }
192
90
  });
91
+ exports.FederatedI18nBoundary = __webpack_exports__.FederatedI18nBoundary;
193
92
  exports.I18nLink = __webpack_exports__.I18nLink;
194
93
  exports.Link = __webpack_exports__.Link;
195
94
  exports.buildLocalizedUrl = __webpack_exports__.buildLocalizedUrl;
@@ -201,6 +100,7 @@ exports.useLocalizedLocation = __webpack_exports__.useLocalizedLocation;
201
100
  exports.useLocalizedPaths = __webpack_exports__.useLocalizedPaths;
202
101
  exports.useModernI18n = __webpack_exports__.useModernI18n;
203
102
  for(var __rspack_i in __webpack_exports__)if (-1 === [
103
+ "FederatedI18nBoundary",
204
104
  "I18nLink",
205
105
  "Link",
206
106
  "buildLocalizedUrl",
@@ -35,8 +35,8 @@ __webpack_require__.d(__webpack_exports__, {
35
35
  });
36
36
  const runtime_namespaceObject = require("@modern-js/runtime");
37
37
  const external_react_namespaceObject = require("react");
38
+ const external_contextHelpers_js_namespaceObject = require("./contextHelpers.js");
38
39
  const sdk_event_js_namespaceObject = require("./i18n/backend/sdk-event.js");
39
- const index_js_namespaceObject = require("./i18n/detection/index.js");
40
40
  const external_routerAdapter_js_namespaceObject = require("./routerAdapter.js");
41
41
  const external_utils_js_namespaceObject = require("./utils.js");
42
42
  function createMinimalI18nInstance(language) {
@@ -50,7 +50,7 @@ function createMinimalI18nInstance(language) {
50
50
  };
51
51
  return minimalInstance;
52
52
  }
53
- function createContextValue(lang, i18nInstance, entryName, languages, localePathRedirect, ignoreRedirectRoutes, localisedUrls, setLang) {
53
+ function createContextValue(lang, i18nInstance, entryName, languages, localePathRedirect, ignoreRedirectRoutes, localisedUrls, setLang, synchronizeLanguage) {
54
54
  const instance = i18nInstance || createMinimalI18nInstance(lang);
55
55
  return {
56
56
  language: lang,
@@ -60,7 +60,8 @@ function createContextValue(lang, i18nInstance, entryName, languages, localePath
60
60
  localePathRedirect,
61
61
  ignoreRedirectRoutes,
62
62
  localisedUrls,
63
- updateLanguage: setLang
63
+ updateLanguage: setLang,
64
+ synchronizeLanguage
64
65
  };
65
66
  }
66
67
  function useSdkResourcesLoader(i18nInstance, setForceUpdate) {
@@ -151,26 +152,56 @@ function useClientSideRedirect(i18nInstance, localePathRedirect, languages, fall
151
152
  localisedUrls
152
153
  ]);
153
154
  }
154
- function useLanguageSync(i18nInstance, localePathRedirect, languages, runtimeContextRef, prevLangRef, setLang) {
155
+ function useLanguageSync(i18nInstance, localePathRedirect, languages, pathname, prevLangRef, setLang) {
156
+ const latestRequestRef = (0, external_react_namespaceObject.useRef)(0);
157
+ const syncQueueRef = (0, external_react_namespaceObject.useRef)(Promise.resolve());
158
+ const isMountedRef = (0, external_react_namespaceObject.useRef)(false);
159
+ const desiredLanguageRef = (0, external_react_namespaceObject.useRef)(void 0);
155
160
  (0, external_react_namespaceObject.useEffect)(()=>{
156
- if (!i18nInstance) return;
157
- if (localePathRedirect) {
158
- const currentPathname = (0, external_utils_js_namespaceObject.getPathname)(runtimeContextRef.current);
159
- const pathDetection = (0, external_utils_js_namespaceObject.detectLanguageFromPath)(currentPathname, languages, localePathRedirect);
160
- if (pathDetection.detected && pathDetection.language) {
161
- const currentLang = pathDetection.language;
162
- if (currentLang !== prevLangRef.current) {
163
- prevLangRef.current = currentLang;
164
- setLang(currentLang);
165
- i18nInstance.setLang?.(currentLang);
166
- i18nInstance.changeLanguage?.(currentLang);
167
- if ((0, runtime_namespaceObject.isBrowser)()) {
168
- const detectionOptions = i18nInstance.options?.detection;
169
- (0, index_js_namespaceObject.cacheUserLanguage)(i18nInstance, currentLang, detectionOptions);
170
- }
161
+ isMountedRef.current = true;
162
+ return ()=>{
163
+ isMountedRef.current = false;
164
+ latestRequestRef.current += 1;
165
+ };
166
+ }, []);
167
+ (0, external_react_namespaceObject.useEffect)(()=>{
168
+ desiredLanguageRef.current = void 0;
169
+ latestRequestRef.current += 1;
170
+ syncQueueRef.current = Promise.resolve();
171
+ }, [
172
+ i18nInstance
173
+ ]);
174
+ const synchronizeLanguage = (0, external_react_namespaceObject.useCallback)((currentLang)=>{
175
+ if (!i18nInstance || !currentLang || desiredLanguageRef.current === currentLang) return;
176
+ desiredLanguageRef.current = currentLang;
177
+ const requestId = ++latestRequestRef.current;
178
+ syncQueueRef.current = syncQueueRef.current.then(async ()=>{
179
+ if (requestId !== latestRequestRef.current || !isMountedRef.current) return;
180
+ try {
181
+ if (i18nInstance.language !== currentLang) await (0, external_contextHelpers_js_namespaceObject.changeI18nInstanceLanguage)(i18nInstance, currentLang);
182
+ if (requestId !== latestRequestRef.current || !isMountedRef.current) return;
183
+ prevLangRef.current = currentLang;
184
+ setLang(currentLang);
185
+ (0, external_contextHelpers_js_namespaceObject.cacheI18nLanguage)(i18nInstance, currentLang);
186
+ } catch (error) {
187
+ if (requestId === latestRequestRef.current && isMountedRef.current) {
188
+ desiredLanguageRef.current = void 0;
189
+ console.error(`Failed to synchronize i18n language "${currentLang}".`, error);
171
190
  }
172
191
  }
192
+ });
193
+ }, [
194
+ i18nInstance,
195
+ prevLangRef,
196
+ setLang
197
+ ]);
198
+ (0, external_react_namespaceObject.useEffect)(()=>{
199
+ if (!i18nInstance) return;
200
+ if (localePathRedirect) {
201
+ const pathDetection = (0, external_utils_js_namespaceObject.detectLanguageFromPath)(pathname || '', languages, localePathRedirect);
202
+ if (pathDetection.detected && pathDetection.language) synchronizeLanguage(pathDetection.language);
173
203
  } else {
204
+ latestRequestRef.current += 1;
174
205
  const instanceLang = i18nInstance.language;
175
206
  if (instanceLang && instanceLang !== prevLangRef.current) {
176
207
  prevLangRef.current = instanceLang;
@@ -181,10 +212,12 @@ function useLanguageSync(i18nInstance, localePathRedirect, languages, runtimeCon
181
212
  i18nInstance,
182
213
  localePathRedirect,
183
214
  languages,
184
- runtimeContextRef,
215
+ pathname,
185
216
  prevLangRef,
186
- setLang
217
+ setLang,
218
+ synchronizeLanguage
187
219
  ]);
220
+ return synchronizeLanguage;
188
221
  }
189
222
  exports.createContextValue = __webpack_exports__.createContextValue;
190
223
  exports.useClientSideRedirect = __webpack_exports__.useClientSideRedirect;
@@ -41,23 +41,23 @@ __webpack_require__.d(__webpack_exports__, {
41
41
  convertBackendOptions: ()=>convertBackendOptions,
42
42
  resolveDefaultLocalesDir: ()=>resolveDefaultLocalesDir
43
43
  });
44
- const external_fs_namespaceObject = require("fs");
45
- var external_fs_default = /*#__PURE__*/ __webpack_require__.n(external_fs_namespaceObject);
46
- const external_path_namespaceObject = require("path");
47
- var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
44
+ const external_node_fs_namespaceObject = require("node:fs");
45
+ var external_node_fs_default = /*#__PURE__*/ __webpack_require__.n(external_node_fs_namespaceObject);
46
+ const external_node_path_namespaceObject = require("node:path");
47
+ var external_node_path_default = /*#__PURE__*/ __webpack_require__.n(external_node_path_namespaceObject);
48
48
  const CONVENTIONAL_LOCALES_DIRS = [
49
49
  './locales',
50
50
  './config/public/locales'
51
51
  ];
52
52
  const isDirectory = (dirPath)=>{
53
53
  try {
54
- return external_fs_default().statSync(dirPath).isDirectory();
54
+ return external_node_fs_default().statSync(dirPath).isDirectory();
55
55
  } catch {
56
56
  return false;
57
57
  }
58
58
  };
59
59
  const resolveDefaultLocalesDir = (cwd = process.cwd())=>{
60
- for (const dir of CONVENTIONAL_LOCALES_DIRS)if (isDirectory(external_path_default().resolve(cwd, dir))) return dir;
60
+ for (const dir of CONVENTIONAL_LOCALES_DIRS)if (isDirectory(external_node_path_default().resolve(cwd, dir))) return dir;
61
61
  return CONVENTIONAL_LOCALES_DIRS[0];
62
62
  };
63
63
  const DEFAULT_I18NEXT_BACKEND_OPTIONS = {
@@ -83,7 +83,7 @@ function getResourceBasePath(resourcePath) {
83
83
  }
84
84
  function pathExists(resourcePath) {
85
85
  try {
86
- return external_fs_default().existsSync(getResourceBasePath(resourcePath));
86
+ return external_node_fs_default().existsSync(getResourceBasePath(resourcePath));
87
87
  } catch {
88
88
  return false;
89
89
  }
@@ -0,0 +1,150 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ const detectorInstanceCache = new WeakMap();
31
+ const DETECTOR_SAFE_OPTION_KEYS = [
32
+ 'lowerCaseLng',
33
+ 'nonExplicitSupportedLngs',
34
+ 'load',
35
+ 'partialBundledLanguages',
36
+ 'returnNull',
37
+ 'returnEmptyString',
38
+ 'returnObjects',
39
+ 'joinArrays',
40
+ 'keySeparator',
41
+ 'nsSeparator',
42
+ 'pluralSeparator',
43
+ 'contextSeparator',
44
+ 'fallbackNS',
45
+ 'ns',
46
+ 'defaultNS',
47
+ 'debug'
48
+ ];
49
+ const stableStringify = (value)=>{
50
+ if (null == value) return JSON.stringify(value);
51
+ if ('object' != typeof value) return JSON.stringify(value);
52
+ if (Array.isArray(value)) return `[${value.map((item)=>stableStringify(item)).join(',')}]`;
53
+ const record = value;
54
+ const sortedKeys = Object.keys(record).sort();
55
+ const sortedEntries = sortedKeys.map((key)=>{
56
+ const stringifiedValue = stableStringify(record[key]);
57
+ return `${JSON.stringify(key)}:${stringifiedValue}`;
58
+ });
59
+ return `{${sortedEntries.join(',')}}`;
60
+ };
61
+ const buildDetectorConfigKey = (languages, fallbackLanguage, mergedDetection)=>stableStringify({
62
+ languages,
63
+ fallbackLanguage,
64
+ detection: mergedDetection
65
+ });
66
+ const pickSafeDetectionOptions = (userInitOptions)=>{
67
+ if (!userInitOptions) return {};
68
+ const safeOptions = {};
69
+ for (const key of DETECTOR_SAFE_OPTION_KEYS){
70
+ const value = userInitOptions[key];
71
+ if (void 0 !== value) safeOptions[key] = value;
72
+ }
73
+ if (userInitOptions.interpolation) safeOptions.interpolation = {
74
+ ...userInitOptions.interpolation
75
+ };
76
+ return safeOptions;
77
+ };
78
+ const cleanupDetectorCacheEntry = (entry)=>{
79
+ if (!entry || !entry.isTemporary) return;
80
+ const instance = entry.instance;
81
+ try {
82
+ instance?.removeAllListeners?.();
83
+ } catch (error) {}
84
+ try {
85
+ instance?.off?.('*');
86
+ } catch (error) {}
87
+ try {
88
+ instance?.services?.backendConnector?.backend?.stop?.();
89
+ } catch (error) {}
90
+ try {
91
+ instance?.services?.backendConnector?.backend?.close?.();
92
+ } catch (error) {}
93
+ };
94
+ const createDetectorInstance = (baseInstance, configKey)=>{
95
+ const cached = detectorInstanceCache.get(baseInstance);
96
+ if (cached && cached.configKey === configKey) return {
97
+ instance: cached.instance,
98
+ isTemporary: cached.isTemporary
99
+ };
100
+ if (cached) {
101
+ cleanupDetectorCacheEntry(cached);
102
+ detectorInstanceCache.delete(baseInstance);
103
+ }
104
+ const createNewInstance = ()=>{
105
+ if ('function' == typeof baseInstance.createInstance) try {
106
+ const created = baseInstance.createInstance();
107
+ if (created) return {
108
+ instance: created,
109
+ isTemporary: true
110
+ };
111
+ } catch (error) {}
112
+ if ('function' == typeof baseInstance.cloneInstance) try {
113
+ const cloned = baseInstance.cloneInstance();
114
+ if (cloned) return {
115
+ instance: cloned,
116
+ isTemporary: true
117
+ };
118
+ } catch (error) {}
119
+ return {
120
+ instance: baseInstance,
121
+ isTemporary: false
122
+ };
123
+ };
124
+ const created = createNewInstance();
125
+ if (created.isTemporary) detectorInstanceCache.set(baseInstance, {
126
+ instance: created.instance,
127
+ isTemporary: true,
128
+ configKey
129
+ });
130
+ return created;
131
+ };
132
+ __webpack_require__.d(__webpack_exports__, {}, {
133
+ buildDetectorConfigKey: buildDetectorConfigKey,
134
+ createDetectorInstance: createDetectorInstance,
135
+ detectorInstanceCache: detectorInstanceCache,
136
+ pickSafeDetectionOptions: pickSafeDetectionOptions
137
+ });
138
+ exports.buildDetectorConfigKey = __webpack_exports__.buildDetectorConfigKey;
139
+ exports.createDetectorInstance = __webpack_exports__.createDetectorInstance;
140
+ exports.detectorInstanceCache = __webpack_exports__.detectorInstanceCache;
141
+ exports.pickSafeDetectionOptions = __webpack_exports__.pickSafeDetectionOptions;
142
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
143
+ "buildDetectorConfigKey",
144
+ "createDetectorInstance",
145
+ "detectorInstanceCache",
146
+ "pickSafeDetectionOptions"
147
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
148
+ Object.defineProperty(exports, '__esModule', {
149
+ value: true
150
+ });
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, getters, values)=>{
5
+ var define = (defs, kind)=>{
6
+ for(var key in defs)if (__webpack_require__.o(defs, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ [kind]: defs[key]
9
+ });
10
+ };
11
+ define(getters, "get");
12
+ define(values, "value");
13
+ };
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
17
+ })();
18
+ (()=>{
19
+ __webpack_require__.r = (exports1)=>{
20
+ if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
21
+ value: 'Module'
22
+ });
23
+ Object.defineProperty(exports1, '__esModule', {
24
+ value: true
25
+ });
26
+ };
27
+ })();
28
+ var __webpack_exports__ = {};
29
+ __webpack_require__.r(__webpack_exports__);
30
+ __webpack_require__.d(__webpack_exports__, {
31
+ detectLanguageFromI18nextDetector: ()=>detectLanguageFromI18nextDetector
32
+ });
33
+ const runtime_namespaceObject = require("@modern-js/runtime");
34
+ const external_cache_js_namespaceObject = require("./cache.js");
35
+ const external_initOptions_js_namespaceObject = require("./initOptions.js");
36
+ const external_language_js_namespaceObject = require("./language.js");
37
+ const external_middleware_js_namespaceObject = require("./middleware.js");
38
+ const initializeI18nForDetector = async (i18nInstance, options)=>{
39
+ const mergedDetection = (0, external_initOptions_js_namespaceObject.mergeDetectionOptions)(options.i18nextDetector, options.detection, options.localePathRedirect, options.userInitOptions);
40
+ const configKey = (0, external_cache_js_namespaceObject.buildDetectorConfigKey)(options.languages, options.fallbackLanguage, mergedDetection);
41
+ const { instance, isTemporary } = (0, external_cache_js_namespaceObject.createDetectorInstance)(i18nInstance, configKey);
42
+ const safeUserOptions = (0, external_cache_js_namespaceObject.pickSafeDetectionOptions)(options.userInitOptions);
43
+ const initOptions = {
44
+ ...safeUserOptions,
45
+ fallbackLng: options.fallbackLanguage,
46
+ supportedLngs: options.languages,
47
+ detection: mergedDetection,
48
+ initImmediate: true,
49
+ interpolation: {
50
+ ...safeUserOptions?.interpolation || {},
51
+ escapeValue: safeUserOptions?.interpolation?.escapeValue ?? false
52
+ },
53
+ react: {
54
+ useSuspense: false
55
+ }
56
+ };
57
+ (0, external_middleware_js_namespaceObject.useI18nextLanguageDetector)(instance);
58
+ if (instance.isInitialized) {
59
+ if (isTemporary) await instance.init(initOptions);
60
+ } else await instance.init(initOptions);
61
+ return {
62
+ detectorInstance: instance,
63
+ isTemporary
64
+ };
65
+ };
66
+ const detectLanguageFromI18nextDetector = async (i18nInstance, options)=>{
67
+ if (!options.i18nextDetector) return;
68
+ const mergedDetection = (0, external_initOptions_js_namespaceObject.mergeDetectionOptions)(options.i18nextDetector, options.detection, options.localePathRedirect, options.userInitOptions);
69
+ const { detectorInstance, isTemporary } = await initializeI18nForDetector(i18nInstance, options);
70
+ try {
71
+ const request = options.ssrContext?.request;
72
+ if (!(0, runtime_namespaceObject.isBrowser)() && !request) return;
73
+ const detectorLang = (0, external_middleware_js_namespaceObject.detectLanguage)(detectorInstance, request, mergedDetection);
74
+ if (detectorLang) {
75
+ const supportedLang = (0, external_language_js_namespaceObject.getSupportedLanguage)(detectorLang, options.languages);
76
+ if (supportedLang) return supportedLang;
77
+ }
78
+ if (detectorInstance.isInitialized && detectorInstance.language) {
79
+ const currentLang = detectorInstance.language;
80
+ if ((0, external_language_js_namespaceObject.isLanguageSupported)(currentLang, options.languages)) return currentLang;
81
+ }
82
+ } catch (error) {} finally{
83
+ if (isTemporary && detectorInstance !== i18nInstance) external_cache_js_namespaceObject.detectorInstanceCache.set(i18nInstance, {
84
+ instance: detectorInstance,
85
+ isTemporary: true,
86
+ configKey: (0, external_cache_js_namespaceObject.buildDetectorConfigKey)(options.languages, options.fallbackLanguage, mergedDetection)
87
+ });
88
+ else if (detectorInstance === i18nInstance) {
89
+ i18nInstance.isInitialized = false;
90
+ delete i18nInstance.language;
91
+ }
92
+ }
93
+ };
94
+ exports.detectLanguageFromI18nextDetector = __webpack_exports__.detectLanguageFromI18nextDetector;
95
+ for(var __rspack_i in __webpack_exports__)if (-1 === [
96
+ "detectLanguageFromI18nextDetector"
97
+ ].indexOf(__rspack_i)) exports[__rspack_i] = __webpack_exports__[__rspack_i];
98
+ Object.defineProperty(exports, '__esModule', {
99
+ value: true
100
+ });