remote-components 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.
Files changed (84) hide show
  1. package/dist/{chunk-2VQGCACH.js → chunk-52BJ7VFA.js} +30 -18
  2. package/dist/chunk-52BJ7VFA.js.map +1 -0
  3. package/dist/{chunk-KKBEMQU7.cjs → chunk-AWWWK2ZY.cjs} +28 -28
  4. package/dist/{chunk-KEPHL25S.js → chunk-D5GNZB6O.js} +2 -1
  5. package/dist/chunk-D5GNZB6O.js.map +1 -0
  6. package/dist/{chunk-W5ESPGHH.js → chunk-GBFUPMMI.js} +5 -5
  7. package/dist/{chunk-ER73O65F.cjs → chunk-I47KE3EC.cjs} +23 -23
  8. package/dist/{chunk-6IUP26UK.cjs → chunk-LCXO7BUY.cjs} +3 -3
  9. package/dist/{chunk-OO4AMJWO.js → chunk-LQ7VQ74E.js} +2 -2
  10. package/dist/{chunk-42N2ZLE2.js → chunk-NZAB7REE.js} +6 -6
  11. package/dist/{chunk-KYJWRZ2B.js → chunk-QKB74MLO.js} +3 -3
  12. package/dist/{chunk-F44NODUS.cjs → chunk-RJW3EZJP.cjs} +26 -26
  13. package/dist/{chunk-HNZVEIKN.js → chunk-SJM7AAGU.js} +2 -2
  14. package/dist/{chunk-ZPMTZ3KJ.js → chunk-SZFCBE54.js} +2 -2
  15. package/dist/{chunk-XCFYWSLD.cjs → chunk-T64P7BAG.cjs} +31 -19
  16. package/dist/chunk-T64P7BAG.cjs.map +1 -0
  17. package/dist/{chunk-CREXMFMF.cjs → chunk-TZT7DLO5.cjs} +4 -4
  18. package/dist/{chunk-R4QFK5TN.cjs → chunk-X6W464D6.cjs} +4 -4
  19. package/dist/{chunk-7MVFHOIP.cjs → chunk-Z2SLBFQL.cjs} +2 -1
  20. package/dist/chunk-Z2SLBFQL.cjs.map +1 -0
  21. package/dist/config/nextjs.cjs +5 -11
  22. package/dist/config/nextjs.cjs.map +1 -1
  23. package/dist/config/nextjs.js +2 -8
  24. package/dist/config/nextjs.js.map +1 -1
  25. package/dist/host/html.cjs +27 -27
  26. package/dist/host/html.js +10 -10
  27. package/dist/host/nextjs/app/client-only.cjs +13 -13
  28. package/dist/host/nextjs/app/client-only.js +8 -8
  29. package/dist/host/react.cjs +9 -9
  30. package/dist/host/react.js +8 -8
  31. package/dist/internal/config/webpack/next-client-pages-loader.cjs +27 -15
  32. package/dist/internal/config/webpack/next-client-pages-loader.cjs.map +1 -1
  33. package/dist/internal/config/webpack/next-client-pages-loader.d.ts +3 -5
  34. package/dist/internal/config/webpack/next-client-pages-loader.js +27 -15
  35. package/dist/internal/config/webpack/next-client-pages-loader.js.map +1 -1
  36. package/dist/internal/host/nextjs/app-client.d.ts +1 -1
  37. package/dist/internal/host/react/context.d.ts +2 -2
  38. package/dist/internal/host/shared/pipeline.d.ts +2 -2
  39. package/dist/internal/runtime/loaders/component-loader.d.ts +2 -2
  40. package/dist/internal/runtime/loaders/static-loader.d.ts +2 -1
  41. package/dist/internal/runtime/namespace.cjs +1 -0
  42. package/dist/internal/runtime/namespace.cjs.map +1 -1
  43. package/dist/internal/runtime/namespace.d.ts +2 -1
  44. package/dist/internal/runtime/namespace.js +1 -0
  45. package/dist/internal/runtime/namespace.js.map +1 -1
  46. package/dist/internal/runtime/types.d.ts +2 -1
  47. package/dist/remote/html.cjs +1 -1
  48. package/dist/remote/html.js +1 -1
  49. package/dist/{script-6W5JRBZK.cjs → script-D5AD7HLV.cjs} +4 -4
  50. package/dist/{script-IFEBOLIA.js → script-VPOI7ARP.js} +3 -3
  51. package/dist/{server-handoff-ce13bebc.d.ts → server-handoff-8c89b856.d.ts} +2 -2
  52. package/dist/{static-loader-X4TSF5KW.js → static-loader-OHSAUD62.js} +3 -3
  53. package/dist/static-loader-UDIXK5MV.cjs +11 -0
  54. package/dist/{turbopack-NPGO3MWS.js → turbopack-5LW6V6IT.js} +5 -5
  55. package/dist/{turbopack-WRMKPNN4.cjs → turbopack-KRKECGY2.cjs} +12 -12
  56. package/dist/{types-59251814.d.ts → types-8b0edd78.d.ts} +7 -0
  57. package/dist/{webpack-DUBHPYD6.js → webpack-NPZNXRNL.js} +5 -5
  58. package/dist/{webpack-KSCMCL7M.cjs → webpack-TTZDARNY.cjs} +12 -12
  59. package/package.json +1 -1
  60. package/dist/chunk-2VQGCACH.js.map +0 -1
  61. package/dist/chunk-7MVFHOIP.cjs.map +0 -1
  62. package/dist/chunk-KEPHL25S.js.map +0 -1
  63. package/dist/chunk-XCFYWSLD.cjs.map +0 -1
  64. package/dist/static-loader-ZYD5BO4D.cjs +0 -11
  65. /package/dist/{chunk-KKBEMQU7.cjs.map → chunk-AWWWK2ZY.cjs.map} +0 -0
  66. /package/dist/{chunk-W5ESPGHH.js.map → chunk-GBFUPMMI.js.map} +0 -0
  67. /package/dist/{chunk-ER73O65F.cjs.map → chunk-I47KE3EC.cjs.map} +0 -0
  68. /package/dist/{chunk-6IUP26UK.cjs.map → chunk-LCXO7BUY.cjs.map} +0 -0
  69. /package/dist/{chunk-OO4AMJWO.js.map → chunk-LQ7VQ74E.js.map} +0 -0
  70. /package/dist/{chunk-42N2ZLE2.js.map → chunk-NZAB7REE.js.map} +0 -0
  71. /package/dist/{chunk-KYJWRZ2B.js.map → chunk-QKB74MLO.js.map} +0 -0
  72. /package/dist/{chunk-F44NODUS.cjs.map → chunk-RJW3EZJP.cjs.map} +0 -0
  73. /package/dist/{chunk-HNZVEIKN.js.map → chunk-SJM7AAGU.js.map} +0 -0
  74. /package/dist/{chunk-ZPMTZ3KJ.js.map → chunk-SZFCBE54.js.map} +0 -0
  75. /package/dist/{chunk-CREXMFMF.cjs.map → chunk-TZT7DLO5.cjs.map} +0 -0
  76. /package/dist/{chunk-R4QFK5TN.cjs.map → chunk-X6W464D6.cjs.map} +0 -0
  77. /package/dist/{script-6W5JRBZK.cjs.map → script-D5AD7HLV.cjs.map} +0 -0
  78. /package/dist/{script-IFEBOLIA.js.map → script-VPOI7ARP.js.map} +0 -0
  79. /package/dist/{static-loader-X4TSF5KW.js.map → static-loader-OHSAUD62.js.map} +0 -0
  80. /package/dist/{static-loader-ZYD5BO4D.cjs.map → static-loader-UDIXK5MV.cjs.map} +0 -0
  81. /package/dist/{turbopack-NPGO3MWS.js.map → turbopack-5LW6V6IT.js.map} +0 -0
  82. /package/dist/{turbopack-WRMKPNN4.cjs.map → turbopack-KRKECGY2.cjs.map} +0 -0
  83. /package/dist/{webpack-DUBHPYD6.js.map → webpack-NPZNXRNL.js.map} +0 -0
  84. /package/dist/{webpack-KSCMCL7M.cjs.map → webpack-TTZDARNY.cjs.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  getScope
3
- } from "./chunk-HNZVEIKN.js";
3
+ } from "./chunk-SJM7AAGU.js";
4
4
  import {
5
5
  getNamespace
6
- } from "./chunk-KEPHL25S.js";
6
+ } from "./chunk-D5GNZB6O.js";
7
7
  import {
8
8
  RemoteComponentsError,
9
9
  logDebug,
@@ -76,6 +76,26 @@ function applySharedModules(bundle, resolve) {
76
76
  // src/config/webpack/next-client-pages-loader.ts
77
77
  function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
78
78
  const self = globalThis;
79
+ const ns = getNamespace();
80
+ ns.pageComponentCache ??= {};
81
+ const cacheKey = `${bundle}:${route}`;
82
+ const applyBundleCss = () => {
83
+ const elements = ns.cssCache[bundle] ?? [];
84
+ if (styleContainer) {
85
+ for (const el of elements) {
86
+ styleContainer.appendChild(el.cloneNode(true));
87
+ }
88
+ } else {
89
+ for (const el of elements) {
90
+ document.head.appendChild(el);
91
+ }
92
+ }
93
+ };
94
+ const cachedEntry = ns.pageComponentCache[cacheKey];
95
+ if (cachedEntry) {
96
+ applyBundleCss();
97
+ return cachedEntry;
98
+ }
79
99
  const nextCssOriginal = document.querySelector(
80
100
  `[id="__next_css__DO_NOT_USE__"]:not([data-bundle="${bundle}"][data-route="${route}"])`
81
101
  );
@@ -137,9 +157,9 @@ function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
137
157
  default: null
138
158
  })
139
159
  ];
140
- const { default: Component } = componentLoader();
141
- const { default: App } = appLoader();
142
- const cssCache = getNamespace().cssCache;
160
+ const { default: Component = null } = componentLoader();
161
+ const { default: App = null } = appLoader();
162
+ const cssCache = ns.cssCache;
143
163
  if (!cssCache[bundle]) {
144
164
  const cssRE = /\.s?css$/;
145
165
  Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).filter((id) => cssRE.test(id)).forEach((id) => {
@@ -160,17 +180,7 @@ function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
160
180
  }
161
181
  cssCache[bundle] = elements;
162
182
  }
163
- if (styleContainer) {
164
- const elements = cssCache[bundle];
165
- elements.forEach((el) => {
166
- styleContainer.appendChild(el.cloneNode(true));
167
- });
168
- } else {
169
- const elements = cssCache[bundle];
170
- elements.forEach((el) => {
171
- document.head.appendChild(el);
172
- });
173
- }
183
+ applyBundleCss();
174
184
  delete self.__NEXT_P;
175
185
  self.__NEXT_P = __NEXT_P_ORIGINAL;
176
186
  if (nextCssOriginal) {
@@ -178,7 +188,9 @@ function nextClientPagesLoader(bundle, route, styleContainer = document.head) {
178
188
  }
179
189
  nextCss.remove();
180
190
  nextCssEnd.remove();
181
- return { Component, App };
191
+ const result = { Component, App };
192
+ ns.pageComponentCache[cacheKey] = result;
193
+ return result;
182
194
  }
183
195
  return { Component: null, App: null };
184
196
  }
@@ -187,4 +199,4 @@ export {
187
199
  applySharedModules,
188
200
  nextClientPagesLoader
189
201
  };
190
- //# sourceMappingURL=chunk-2VQGCACH.js.map
202
+ //# sourceMappingURL=chunk-52BJ7VFA.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config/webpack/apply-shared-modules.ts","../src/config/webpack/next-client-pages-loader.ts"],"sourcesContent":["// Webpack shared module patching\n// used in multiple remote component host types\n// multiple host types includes: HTML custom element for remote components and Next.js host application\n// we are using this shared function to patch a Webpack module map\n// to use shared modules between the host application and the remote component\n\nimport { getScope } from '#internal/runtime/turbopack/remote-scope';\nimport { logDebug, logWarn } from '#internal/utils/logger';\n\nconst DEDUPLICATION_SKIPPED =\n 'shared module deduplication skipped. The remote may load its own copy of shared dependencies.';\n\nexport function applySharedModules(\n bundle: string,\n resolve: Record<string, unknown>,\n) {\n logDebug(\n 'SharedModules',\n `applySharedModules called for bundle: \"${bundle}\"`,\n );\n logDebug(\n 'SharedModules',\n `Shared modules to resolve: ${Object.keys(resolve)}`,\n );\n\n // make a typed reference to the global scope\n const self = globalThis as typeof globalThis & {\n // webpack remote module loading function scoped for each bundle\n __remote_webpack_require__?: Record<\n string,\n ((remoteId: string) => unknown) & {\n m?: Record<string | number, (module: { exports: unknown }) => void>;\n }\n >;\n // webpack module map for each bundle used in production builds\n __remote_webpack_module_map__?: Record<string, Record<string, number>>;\n } & Record<string, string[]>;\n\n // Prefer scope-based access when available.\n const scope = getScope(bundle);\n // @legacy(v0.3.4) — fall back to global __remote_webpack_require__ for hosts that\n // haven't run setupWebpackRuntime yet (e.g. HTML host's inline path).\n // Remove once all host types go through the shared pipeline (Phase 5).\n const webpackBundle =\n scope?.webpackRequire ?? self.__remote_webpack_require__?.[bundle];\n\n if (webpackBundle) {\n const modulePaths = Object.keys(\n self.__remote_webpack_module_map__?.[bundle] ?? webpackBundle.m ?? {},\n );\n logDebug(\n 'SharedModules',\n `Available module paths for bundle \"${bundle}\": ${modulePaths}`,\n );\n\n // patch all modules in the bundle to use the shared modules\n for (const [key, value] of Object.entries(resolve)) {\n const exactIds = modulePaths.filter((p) => p === key);\n const ids =\n exactIds.length > 0\n ? exactIds\n : modulePaths.filter((p) => p.includes(key));\n\n if (ids.length === 0) {\n logDebug(\n 'SharedModules',\n `No matching module path found for shared module \"${key}\"`,\n );\n }\n\n for (const id of ids) {\n if (webpackBundle.m) {\n // if we have a module map, we need to use the mapped id\n // this is required for production builds where the module ids are module id numbers\n const resolvedId = self.__remote_webpack_module_map__?.[bundle]?.[id]\n ? `${self.__remote_webpack_module_map__[bundle][id]}`\n : id;\n if (resolvedId !== id) {\n logDebug(\n 'SharedModules',\n `Mapped module id: \"${id}\" -> \"${resolvedId}\"`,\n );\n }\n // create a mock module which exports the shared module\n webpackBundle.m[resolvedId] = (module) => {\n module.exports = value;\n };\n } else {\n logWarn(\n 'SharedModules',\n `webpackBundle.m is not available for bundle \"${bundle}\" — ${DEDUPLICATION_SKIPPED}`,\n );\n }\n }\n }\n } else {\n logWarn(\n 'SharedModules',\n `No webpack require found for bundle \"${bundle}\" — ${DEDUPLICATION_SKIPPED}`,\n );\n logDebug(\n 'SharedModules',\n `Available bundles: ${Object.keys(self.__remote_webpack_require__ ?? {})}`,\n );\n }\n}\n","import { getNamespace } from '#internal/runtime/namespace';\nimport { RemoteComponentsError } from '#internal/utils/error';\n\n// module loader for Next.js Pages Router\nexport function nextClientPagesLoader(\n bundle: string,\n route: string,\n styleContainer: HTMLHeadElement | ShadowRoot | null = document.head,\n) {\n // make a typed reference to the global scope\n const self = globalThis as typeof globalThis & {\n // webpack remote module loading function scoped for each bundle\n __remote_webpack_require__?: Record<\n string,\n ((remoteId: string | number) => unknown) & {\n c?: Record<\n string | number,\n { id: string; parents: string[]; children: string[] }\n >;\n m?: Record<string | number, (module: { exports: unknown }) => void>;\n type?: 'turbopack' | 'webpack';\n }\n >;\n // webpack module map for each bundle used in production builds\n __remote_webpack_module_map__?: Record<string, Record<string, number>>;\n // Next.js client pages loader reference storage\n __NEXT_P?: [\n (\n | [\n string,\n () => { default?: React.ComponentType<Record<string, unknown>> },\n ]\n | undefined\n ),\n (\n | [\n string,\n () => {\n default?: React.ComponentType<\n {\n Component: React.ComponentType<Record<string, unknown>>;\n } & Record<string, unknown>\n >;\n },\n ]\n | undefined\n ),\n (\n | [\n string,\n () => {\n default?: React.ComponentType<\n {\n Component: React.ComponentType<Record<string, unknown>>;\n } & Record<string, unknown>\n >;\n },\n ]\n | undefined\n ),\n ];\n };\n\n const ns = getNamespace();\n ns.pageComponentCache ??= {};\n const cacheKey = `${bundle}:${route}`;\n\n // Applies the cached CSS for `bundle` into the caller's styleContainer.\n // Mirrors the final CSS-attach step of the fresh-load path so that cache\n // hits and additional host instances (each with their own shadow root)\n // still receive the styles.\n const applyBundleCss = () => {\n const elements = ns.cssCache[bundle] ?? [];\n if (styleContainer) {\n for (const el of elements) {\n styleContainer.appendChild(el.cloneNode(true));\n }\n } else {\n for (const el of elements) {\n document.head.appendChild(el);\n }\n }\n };\n\n // On repeat loads (e.g. after history.back()) the next-client-pages-loader\n // chunk is already cached by webpack and its factory won't re-run, so\n // __NEXT_P wouldn't be populated. Reuse the Component/App extracted on the\n // first load, but still run the CSS attach below because the caller may be\n // a different host instance with its own styleContainer.\n const cachedEntry = ns.pageComponentCache[cacheKey];\n if (cachedEntry) {\n applyBundleCss();\n return cachedEntry;\n }\n\n // temporarily remove the original Next.js CSS loader\n const nextCssOriginal = document.querySelector(\n `[id=\"__next_css__DO_NOT_USE__\"]:not([data-bundle=\"${bundle}\"][data-route=\"${route}\"])`,\n );\n if (nextCssOriginal) {\n nextCssOriginal.parentNode?.removeChild(nextCssOriginal);\n }\n\n // create a new Next.js CSS loader element\n const nextCss = document.createElement('noscript');\n nextCss.id = '__next_css__DO_NOT_USE__';\n nextCss.setAttribute('data-bundle', bundle);\n nextCss.setAttribute('data-route', route);\n const nextCssEnd = document.createElement('noscript');\n nextCssEnd.id = '__next_css__DO_NOT_USE_END__';\n nextCssEnd.setAttribute('data-bundle', bundle);\n nextCssEnd.setAttribute('data-route', route);\n document.head.appendChild(nextCssEnd);\n document.head.appendChild(nextCss);\n\n // find the page component loader chunk\n const componentLoaderChunk =\n Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(\n (key) =>\n key.includes('/webpack/loaders/next-client-pages-loader.js') &&\n key.includes(`page=${encodeURIComponent(route)}!`),\n ) ??\n Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(\n (key) => key.includes('/next/dist/client/page-loader.js'),\n ) ??\n self.__remote_webpack_module_map__?.[bundle]?.[\n Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(\n (key) =>\n key.includes('/webpack/loaders/next-client-pages-loader.js') &&\n key.includes(`page=${encodeURIComponent(route)}!`),\n ) ??\n Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(\n (key) => key.includes('/next/dist/client/page-loader.js'),\n ) ??\n ''\n ] ??\n -1;\n\n // find the app loader chunk\n const appLoaderChunk =\n Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(\n (key) =>\n key.includes('/webpack/loaders/next-client-pages-loader.js') &&\n key.includes(`page=%2F_app`),\n ) ??\n Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {}).find(\n (key) => key.includes('/next/dist/client/page-loader.js'),\n ) ??\n self.__remote_webpack_module_map__?.[bundle]?.[\n Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(\n (key) =>\n key.includes('/webpack/loaders/next-client-pages-loader.js') &&\n key.includes(`page=%2F_app`),\n ) ??\n Object.keys(self.__remote_webpack_module_map__[bundle] ?? {}).find(\n (key) => key.includes('/next/dist/client/page-loader.js'),\n ) ??\n ''\n ] ??\n -1;\n\n // if we didn't find the component loader or app loader, throw an error\n if (!(componentLoaderChunk && appLoaderChunk)) {\n throw new RemoteComponentsError(\n `Next.js client pages loader not found in bundle \"${bundle}\".`,\n );\n }\n\n // temporarily store the original __NEXT_P reference\n // this is required to avoid conflicts with the Next.js client pages loader\n // which uses the same global variable to store the page components\n const __NEXT_P_ORIGINAL = self.__NEXT_P;\n const selfOriginal = self;\n delete selfOriginal.__NEXT_P;\n\n // load the component and app loader chunks\n self.__remote_webpack_require__?.[bundle]?.(\n self.__remote_webpack_require__[bundle].type !== 'turbopack'\n ? componentLoaderChunk\n : `[${bundle}] ${componentLoaderChunk}`,\n );\n if (\n typeof appLoaderChunk === 'string' ||\n (typeof appLoaderChunk === 'number' && appLoaderChunk !== -1)\n ) {\n self.__remote_webpack_require__?.[bundle]?.(\n self.__remote_webpack_require__[bundle].type !== 'turbopack'\n ? appLoaderChunk\n : `[${bundle}] ${appLoaderChunk}`,\n );\n }\n\n // if we have the __NEXT_P global variable, we can extract the component and app\n if (self.__NEXT_P) {\n const [, componentLoader] = self.__NEXT_P[0] ?? [\n undefined,\n () => ({ default: null }),\n ];\n const [, appLoader] = self.__NEXT_P[2] ?? [\n undefined,\n () => ({\n default: null,\n }),\n ];\n const { default: Component = null } = componentLoader();\n const { default: App = null } = appLoader();\n\n const cssCache = ns.cssCache;\n\n if (!cssCache[bundle]) {\n // load the CSS files from the remote bundle\n const cssRE = /\\.s?css$/;\n Object.keys(self.__remote_webpack_require__?.[bundle]?.m ?? {})\n .filter((id) => cssRE.test(id))\n .forEach((id) => {\n self.__remote_webpack_require__?.[bundle]?.(id);\n });\n\n Object.keys(self.__remote_webpack_module_map__?.[bundle] ?? {})\n .filter((path) => cssRE.test(path))\n .forEach((path) => {\n const id = self.__remote_webpack_module_map__?.[bundle]?.[path];\n if (id) {\n self.__remote_webpack_require__?.[bundle]?.(id);\n }\n });\n\n const elements = [];\n let node = nextCss.previousSibling;\n while (node && node !== nextCssEnd) {\n elements.push(node);\n node.remove();\n node = nextCss.previousSibling;\n }\n cssCache[bundle] = elements;\n }\n\n applyBundleCss();\n\n // restore the original __NEXT_P reference\n delete self.__NEXT_P;\n self.__NEXT_P = __NEXT_P_ORIGINAL;\n\n // restore the original Next.js CSS loader\n if (nextCssOriginal) {\n nextCssOriginal.parentNode?.appendChild(nextCssOriginal);\n }\n\n nextCss.remove();\n nextCssEnd.remove();\n\n const result = { Component, App };\n ns.pageComponentCache[cacheKey] = result;\n return result;\n }\n\n return { Component: null, App: null };\n}\n"],"mappings":";;;;;;;;;;;;;AASA,IAAM,wBACJ;AAEK,SAAS,mBACd,QACA,SACA;AACA;AAAA,IACE;AAAA,IACA,0CAA0C;AAAA,EAC5C;AACA;AAAA,IACE;AAAA,IACA,8BAA8B,OAAO,KAAK,OAAO;AAAA,EACnD;AAGA,QAA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AAK;AACZ,SAAK,WAAW;AAGhB,QAAI,iBAAiB;AACnB,sBAAgB,YAAY,YAAY,eAAe;AAAA,IACzD;AAEA,YAAQ,OAAO;AACf,eAAW,OAAO;AAElB,UAAM,SAAS,EAAE,WAAW,IAAI;AAChC,OAAG,mBAAmB,QAAQ,IAAI;AAClC,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,WAAW,MAAM,KAAK,KAAK;AACtC;","names":[]}
@@ -7,10 +7,10 @@
7
7
 
8
8
 
9
9
 
10
- var _chunkER73O65Fcjs = require('./chunk-ER73O65F.cjs');
10
+ var _chunkI47KE3ECcjs = require('./chunk-I47KE3EC.cjs');
11
11
 
12
12
 
13
- var _chunkCREXMFMFcjs = require('./chunk-CREXMFMF.cjs');
13
+ var _chunkTZT7DLO5cjs = require('./chunk-TZT7DLO5.cjs');
14
14
 
15
15
 
16
16
 
@@ -18,10 +18,10 @@ var _chunkCREXMFMFcjs = require('./chunk-CREXMFMF.cjs');
18
18
 
19
19
 
20
20
 
21
- var _chunkR4QFK5TNcjs = require('./chunk-R4QFK5TN.cjs');
21
+ var _chunkX6W464D6cjs = require('./chunk-X6W464D6.cjs');
22
22
 
23
23
 
24
- var _chunk7MVFHOIPcjs = require('./chunk-7MVFHOIP.cjs');
24
+ var _chunkZ2SLBFQLcjs = require('./chunk-Z2SLBFQL.cjs');
25
25
 
26
26
 
27
27
 
@@ -89,7 +89,7 @@ function setAttributesFromProps(el, props) {
89
89
  function useResolveClientUrl(prop, urlHref) {
90
90
  const { resolveClientUrl: contextValue } = _context.useRemoteComponentsContext.call(void 0, );
91
91
  const raw = _nullishCoalesce(prop, () => ( contextValue));
92
- return _react.useMemo.call(void 0, () => _chunkER73O65Fcjs.bindResolveClientUrl.call(void 0, raw, urlHref), [raw, urlHref]);
92
+ return _react.useMemo.call(void 0, () => _chunkI47KE3ECcjs.bindResolveClientUrl.call(void 0, raw, urlHref), [raw, urlHref]);
93
93
  }
94
94
 
95
95
  // src/host/react/hooks/use-shadow-root.ts
@@ -101,7 +101,7 @@ function useShadowRoot({
101
101
  }) {
102
102
  const shadowRootContainerRef = _react.useRef.call(void 0, null);
103
103
  const [shadowRoot, setShadowRoot] = _react.useState.call(void 0, () => {
104
- const shadowRoots = _chunk7MVFHOIPcjs.getNamespace.call(void 0, ).shadowRoots;
104
+ const shadowRoots = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, ).shadowRoots;
105
105
  const ssrShadowRoot = typeof document !== "undefined" ? _nullishCoalesce(_nullishCoalesce(_optionalChain([document, 'access', _ => _.querySelector, 'call', _2 => _2(
106
106
  `[data-remote-component-id="shadowroot_${keySuffix}"]`
107
107
  ), 'optionalAccess', _3 => _3.shadowRoot]), () => ( shadowRoots[keySuffix])), () => ( null)) : null;
@@ -109,7 +109,7 @@ function useShadowRoot({
109
109
  return ssrShadowRoot;
110
110
  });
111
111
  _react.useLayoutEffect.call(void 0, () => {
112
- const shadowRoots = _chunk7MVFHOIPcjs.getNamespace.call(void 0, ).shadowRoots;
112
+ const shadowRoots = _chunkZ2SLBFQLcjs.getNamespace.call(void 0, ).shadowRoots;
113
113
  if (isolate !== false && typeof document !== "undefined" && (!shadowRoot || !shadowRoot.isConnected)) {
114
114
  let shadowRootElement = null;
115
115
  const element = document.querySelector(
@@ -151,7 +151,7 @@ function getRemoteComponentHtml(html) {
151
151
  return ssrRemoteComponentContainer.innerHTML;
152
152
  }
153
153
  const remoteComponentContainer = temp.querySelectorAll(
154
- `div[data-bundle][data-route][data-runtime][id^="${_chunkR4QFK5TNcjs.DEFAULT_COMPONENT_NAME}"],div[data-bundle][data-route],div#__next,remote-component:not([src])`
154
+ `div[data-bundle][data-route][data-runtime][id^="${_chunkX6W464D6cjs.DEFAULT_COMPONENT_NAME}"],div[data-bundle][data-route],div#__next,remote-component:not([src])`
155
155
  );
156
156
  if (remoteComponentContainer.length > 0) {
157
157
  return `${Array.from(temp.querySelectorAll("link,script")).map((link) => link.outerHTML).join("")}${Array.from(remoteComponentContainer).map((container) => container.outerHTML).join("")}`;
@@ -168,7 +168,7 @@ function ConsumeRemoteComponent({
168
168
  mode = "open",
169
169
  reset,
170
170
  credentials: credentialsProp,
171
- name: nameProp = _chunkR4QFK5TNcjs.DEFAULT_COMPONENT_NAME,
171
+ name: nameProp = _chunkX6W464D6cjs.DEFAULT_COMPONENT_NAME,
172
172
  shared: sharedProp,
173
173
  children,
174
174
  onBeforeLoad,
@@ -184,22 +184,22 @@ function ConsumeRemoteComponent({
184
184
  const credentials = _nullishCoalesce(_nullishCoalesce(credentialsProp, () => ( contextCredentials)), () => ( "same-origin"));
185
185
  const shared = _nullishCoalesce(_nullishCoalesce(sharedProp, () => ( contextShared)), () => ( {}));
186
186
  const emitter = _react.useMemo.call(void 0,
187
- () => _chunkER73O65Fcjs.makeReactEmitter.call(void 0, { onBeforeLoad, onLoad, onError, onChange }),
187
+ () => _chunkI47KE3ECcjs.makeReactEmitter.call(void 0, { onBeforeLoad, onLoad, onError, onChange }),
188
188
  [onBeforeLoad, onLoad, onError, onChange]
189
189
  );
190
190
  const name = _react.useMemo.call(void 0,
191
- () => _chunkER73O65Fcjs.resolveNameFromSrc.call(void 0, src, nameProp),
191
+ () => _chunkI47KE3ECcjs.resolveNameFromSrc.call(void 0, src, nameProp),
192
192
  [src, nameProp]
193
193
  );
194
194
  const [data, setData] = _react.useState.call(void 0,
195
195
  null
196
196
  );
197
- const url = _react.useMemo.call(void 0, () => _chunkER73O65Fcjs.getClientOrServerUrl.call(void 0, src, DUMMY_FALLBACK), [src]);
197
+ const url = _react.useMemo.call(void 0, () => _chunkI47KE3ECcjs.getClientOrServerUrl.call(void 0, src, DUMMY_FALLBACK), [src]);
198
198
  const resolveClientUrl = useResolveClientUrl(resolveClientUrlProp, url.href);
199
199
  const id = url.origin === (typeof location !== "undefined" ? location.origin : DUMMY_FALLBACK) ? url.pathname : url.href;
200
- const keySuffix = `${_chunkR4QFK5TNcjs.escapeString.call(void 0, id)}_${_chunkR4QFK5TNcjs.escapeString.call(void 0,
200
+ const keySuffix = `${_chunkX6W464D6cjs.escapeString.call(void 0, id)}_${_chunkX6W464D6cjs.escapeString.call(void 0,
201
201
  _nullishCoalesce(_optionalChain([data, 'optionalAccess', _5 => _5.name]), () => ( name))
202
- )}_${_chunkR4QFK5TNcjs.escapeString.call(void 0, instanceId)}`;
202
+ )}_${_chunkX6W464D6cjs.escapeString.call(void 0, instanceId)}`;
203
203
  const [remoteComponent, setRemoteComponent] = _react.useState.call(void 0, null);
204
204
  const { shadowRoot, shadowRootContainerRef } = useShadowRoot({
205
205
  isolate,
@@ -225,13 +225,13 @@ function ConsumeRemoteComponent({
225
225
  return elements;
226
226
  })() : []
227
227
  );
228
- const hostStateRef = _react.useRef.call(void 0, _chunkER73O65Fcjs.createHostState.call(void 0, ));
228
+ const hostStateRef = _react.useRef.call(void 0, _chunkI47KE3ECcjs.createHostState.call(void 0, ));
229
229
  const componentHydrationHtml = _react.useRef.call(void 0, null);
230
230
  const prevRemoteComponentContainerRef = _react.useRef.call(void 0, null);
231
231
  const unmountRef = _react.useRef.call(void 0, null);
232
232
  _react.useLayoutEffect.call(void 0, () => {
233
233
  return () => {
234
- delete _chunk7MVFHOIPcjs.getNamespace.call(void 0, ).shadowRoots[keySuffix];
234
+ delete _chunkZ2SLBFQLcjs.getNamespace.call(void 0, ).shadowRoots[keySuffix];
235
235
  };
236
236
  }, [keySuffix]);
237
237
  _react.useLayoutEffect.call(void 0, () => {
@@ -291,7 +291,7 @@ function ConsumeRemoteComponent({
291
291
  _nullishCoalesce(_optionalChain([resolveClientUrl, 'optionalCall', _29 => _29(url.href)]), () => ( url.href)),
292
292
  location.href
293
293
  );
294
- const res = await _chunkER73O65Fcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
294
+ const res = await _chunkI47KE3ECcjs.fetchWithHooks.call(void 0, resolvedUrl, fetchInit, {
295
295
  onRequest,
296
296
  onResponse,
297
297
  abortController: hostStateRef.current.abortController
@@ -310,7 +310,7 @@ function ConsumeRemoteComponent({
310
310
  const userShared = await shared;
311
311
  if (signal.aborted)
312
312
  return;
313
- const prepared = _chunkER73O65Fcjs.preparePipeline.call(void 0, {
313
+ const prepared = _chunkI47KE3ECcjs.preparePipeline.call(void 0, {
314
314
  html,
315
315
  name,
316
316
  url,
@@ -332,7 +332,7 @@ function ConsumeRemoteComponent({
332
332
  shadowRoot.innerHTML = "";
333
333
  }
334
334
  const prevUrl = hostStateRef.current.prevUrl;
335
- if (prevUrl && _chunk7MVFHOIPcjs.getNamespace.call(void 0, ).unmountFns[prevUrl.href]) {
335
+ if (prevUrl && _chunkZ2SLBFQLcjs.getNamespace.call(void 0, ).unmountFns[prevUrl.href]) {
336
336
  const unmountPromises = Promise.all(
337
337
  Array.from(_nullishCoalesce(unmountRef.current, () => ( []))).map(
338
338
  async (unmount) => unmount(
@@ -351,7 +351,7 @@ function ConsumeRemoteComponent({
351
351
  href: new URL(_nullishCoalesce(link.getAttribute("href"), () => ( link.href)), url).href,
352
352
  ...link.getAttributeNames().reduce((acc, key) => {
353
353
  if (key !== "href") {
354
- acc[_nullishCoalesce(_chunkR4QFK5TNcjs.attrToProp[key], () => ( key))] = _nullishCoalesce(link.getAttribute(key), () => ( ""));
354
+ acc[_nullishCoalesce(_chunkX6W464D6cjs.attrToProp[key], () => ( key))] = _nullishCoalesce(link.getAttribute(key), () => ( ""));
355
355
  }
356
356
  return acc;
357
357
  }, {})
@@ -413,7 +413,7 @@ function ConsumeRemoteComponent({
413
413
  });
414
414
  self.__next_s = prevNextScripts;
415
415
  }
416
- const rscName = rsc ? `__remote_component_rsc_${_chunkR4QFK5TNcjs.escapeString.call(void 0, id)}_${_chunkR4QFK5TNcjs.escapeString.call(void 0,
416
+ const rscName = rsc ? `__remote_component_rsc_${_chunkX6W464D6cjs.escapeString.call(void 0, id)}_${_chunkX6W464D6cjs.escapeString.call(void 0,
417
417
  remoteName
418
418
  )}` : void 0;
419
419
  if (rsc) {
@@ -449,7 +449,7 @@ function ConsumeRemoteComponent({
449
449
  shadowRoot.innerHTML = shadowRootHtml;
450
450
  htmlRef.current = null;
451
451
  setRemoteComponent(null);
452
- const { mount, unmount } = await _chunkCREXMFMFcjs.loadStaticRemoteComponent.call(void 0,
452
+ const { mount, unmount } = await _chunkTZT7DLO5cjs.loadStaticRemoteComponent.call(void 0,
453
453
  Array.from(shadowRoot.querySelectorAll("script")),
454
454
  url,
455
455
  resolveClientUrl
@@ -471,7 +471,7 @@ function ConsumeRemoteComponent({
471
471
  )
472
472
  );
473
473
  htmlRef.current = null;
474
- const { mount, unmount } = await _chunkCREXMFMFcjs.loadStaticRemoteComponent.call(void 0,
474
+ const { mount, unmount } = await _chunkTZT7DLO5cjs.loadStaticRemoteComponent.call(void 0,
475
475
  Array.from(component.querySelectorAll("script")),
476
476
  url,
477
477
  resolveClientUrl
@@ -486,7 +486,7 @@ function ConsumeRemoteComponent({
486
486
  }
487
487
  hostStateRef.current.stage = "loaded";
488
488
  } else {
489
- const result = await _chunkER73O65Fcjs.loadPrepared.call(void 0, {
489
+ const result = await _chunkI47KE3ECcjs.loadPrepared.call(void 0, {
490
490
  prepared,
491
491
  url,
492
492
  signal,
@@ -555,8 +555,8 @@ function ConsumeRemoteComponent({
555
555
  const metadataJson = /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "script", { "data-remote-component": true, type: "application/json", children: JSON.stringify({
556
556
  name: _optionalChain([data, 'optionalAccess', _33 => _33.name]) || name,
557
557
  bundle: _optionalChain([data, 'optionalAccess', _34 => _34.bundle]) || "default",
558
- route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) || _chunkR4QFK5TNcjs.DEFAULT_ROUTE,
559
- runtime: hostStateRef.current.prevIsRemoteComponent ? _chunkR4QFK5TNcjs.RUNTIME_SCRIPT : _optionalChain([data, 'optionalAccess', _36 => _36.runtime]) || _chunkR4QFK5TNcjs.RUNTIME_WEBPACK
558
+ route: _optionalChain([data, 'optionalAccess', _35 => _35.route]) || _chunkX6W464D6cjs.DEFAULT_ROUTE,
559
+ runtime: hostStateRef.current.prevIsRemoteComponent ? _chunkX6W464D6cjs.RUNTIME_SCRIPT : _optionalChain([data, 'optionalAccess', _36 => _36.runtime]) || _chunkX6W464D6cjs.RUNTIME_WEBPACK
560
560
  }) });
561
561
  const resetStyle = reset ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { "data-remote-components-reset": "react", children: `:host { all: initial; }` }) : null;
562
562
  const linksToRender = _optionalChain([data, 'optionalAccess', _37 => _37.links, 'optionalAccess', _38 => _38.map, 'call', _39 => _39((link) => /* @__PURE__ */ _react.createElement.call(void 0,
@@ -576,7 +576,7 @@ function ConsumeRemoteComponent({
576
576
  shadowRoot.innerHTML = componentHydrationHtml.current;
577
577
  componentHydrationHtml.current = null;
578
578
  if (hostStateRef.current.prevIsRemoteComponent) {
579
- _chunkCREXMFMFcjs.loadStaticRemoteComponent.call(void 0,
579
+ _chunkTZT7DLO5cjs.loadStaticRemoteComponent.call(void 0,
580
580
  Array.from(shadowRoot.querySelectorAll("script")),
581
581
  url,
582
582
  resolveClientUrl
@@ -667,4 +667,4 @@ function ConsumeRemoteComponent({
667
667
 
668
668
 
669
669
  exports.ConsumeRemoteComponent = ConsumeRemoteComponent;
670
- //# sourceMappingURL=chunk-KKBEMQU7.cjs.map
670
+ //# sourceMappingURL=chunk-AWWWK2ZY.cjs.map
@@ -32,6 +32,7 @@ function getNamespace() {
32
32
  dispatcherRuntime: void 0,
33
33
  hostSharedModules: {},
34
34
  cssCache: {},
35
+ pageComponentCache: {},
35
36
  shadowRoots: {}
36
37
  };
37
38
  const nsRecord = ns;
@@ -57,4 +58,4 @@ function getNamespace() {
57
58
  export {
58
59
  getNamespace
59
60
  };
60
- //# sourceMappingURL=chunk-KEPHL25S.js.map
61
+ //# sourceMappingURL=chunk-D5GNZB6O.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/runtime/namespace.ts"],"sourcesContent":["import type React from 'react';\nimport type { RemoteScope } from '#internal/runtime/turbopack/remote-scope';\nimport type {\n GlobalScope,\n MountOrUnmountFunction,\n MountUnmountFunctions,\n} from '#internal/runtime/types';\n\n/**\n * Typed namespace for all remote-components runtime state.\n *\n * Consolidates scattered `globalThis` globals into a single object at\n * `globalThis.__remote_components__`. Each property corresponds to a\n * previously independent global — see inline `@see` tags for the original\n * global name. Code that previously read from those globals still works\n * because each migration writes through to both the namespace and the\n * legacy global (pointing at the same underlying object).\n */\nexport interface RemoteComponentsNamespace {\n /** @see `__remote_component_scopes__` */\n scopes: Map<string, RemoteScope>;\n /** @see `__remote_components_turbopack_chunk_loader_promise__` */\n chunkCache: Record<string, Promise<unknown>>;\n /** @see `__remote_script_entrypoint_mount__` */\n mountFns: Record<string, Set<MountOrUnmountFunction>>;\n /** @see `__remote_script_entrypoint_unmount__` */\n unmountFns: Record<string, Set<MountOrUnmountFunction>>;\n /** @see `__remote_bundle_url__` */\n bundleUrls: Record<string, string | URL>;\n /** @see `__rc_module_registry__` */\n moduleRegistry: Record<string, unknown>;\n /** @see `__webpack_require_type__` */\n dispatcherRuntime: string | undefined;\n /** @see `__remote_component_host_shared_modules__` */\n hostSharedModules: Record<string, () => Promise<unknown>>;\n /** @see `__remote_next_css__` */\n cssCache: Record<string, ChildNode[]>;\n pageComponentCache?: Record<\n string,\n {\n Component: React.ComponentType<Record<string, unknown>> | null;\n App: React.ComponentType<\n { Component: React.ComponentType<Record<string, unknown>> } & Record<\n string,\n unknown\n >\n > | null;\n }\n >;\n /** @see `__remote_components_shadowroot_*` */\n shadowRoots: Record<string, ShadowRoot | null>;\n}\n\n/** Prefix for legacy per-key shadow root globals (`__remote_components_shadowroot_*`). */\nconst SHADOW_ROOT_PREFIX = '__remote_components_shadowroot_';\n\n/**\n * Backward-compat aliases for globals used in <=0.3.3.\n *\n * Only includes object/Map values that can be aliased by reference.\n * Primitives (`dispatcherRuntime`) must use write-through at their call sites.\n * Dynamic-key shadow root globals are adopted separately in `getNamespace()`.\n */\nconst LEGACY_ALIASES: ReadonlyArray<{\n global: string;\n prop: keyof RemoteComponentsNamespace;\n}> = [\n { global: '__remote_component_scopes__', prop: 'scopes' },\n {\n global: '__remote_components_turbopack_chunk_loader_promise__',\n prop: 'chunkCache',\n },\n { global: '__remote_script_entrypoint_mount__', prop: 'mountFns' },\n { global: '__remote_script_entrypoint_unmount__', prop: 'unmountFns' },\n { global: '__remote_bundle_url__', prop: 'bundleUrls' },\n { global: '__rc_module_registry__', prop: 'moduleRegistry' },\n {\n global: '__remote_component_host_shared_modules__',\n prop: 'hostSharedModules',\n },\n { global: '__remote_next_css__', prop: 'cssCache' },\n];\n\n/**\n * Returns the single shared `RemoteComponentsNamespace` instance, creating\n * it on first access. The namespace lives at `globalThis.__remote_components__`\n * so every module in the page shares the same state regardless of how many\n * copies of the library are loaded.\n *\n * On first initialization this function also handles backward compatibility\n * with legacy globals:\n * 1. **Adopt**: if a legacy global already exists (written by older code before\n * the namespace was created), its value becomes the initial namespace value.\n * 2. **Alias**: legacy globals are assigned to point at the namespace's objects,\n * so older code that reads the legacy global sees the same reference.\n */\nexport function getNamespace(): RemoteComponentsNamespace {\n const g = globalThis as GlobalScope & MountUnmountFunctions;\n const existing = g.__remote_components__;\n if (existing) {\n return existing;\n }\n\n const ns: RemoteComponentsNamespace = {\n scopes: new Map(),\n chunkCache: {},\n mountFns: {},\n unmountFns: {},\n bundleUrls: {},\n moduleRegistry: {},\n dispatcherRuntime: undefined,\n hostSharedModules: {},\n cssCache: {},\n pageComponentCache: {},\n shadowRoots: {},\n };\n\n // Adopt any pre-existing legacy globals, then alias them to the namespace.\n const nsRecord = ns as unknown as Record<string, unknown>;\n for (const { global, prop } of LEGACY_ALIASES) {\n const legacyValue = (g as Record<string, unknown>)[global];\n if (legacyValue != null) {\n nsRecord[prop] = legacyValue;\n }\n (g as Record<string, unknown>)[global] = ns[prop];\n }\n\n // Adopt per-key shadow root globals used in <=0.3.3\n // (e.g. `globalThis.__remote_components_shadowroot_<key> = root`).\n const gRecord = g as Record<string, unknown>;\n for (const key of Object.keys(gRecord)) {\n if (key.startsWith(SHADOW_ROOT_PREFIX)) {\n const suffix = key.slice(SHADOW_ROOT_PREFIX.length);\n ns.shadowRoots[suffix] = gRecord[key] as ShadowRoot | null;\n delete gRecord[key];\n }\n }\n\n g.__remote_components__ = ns;\n return ns;\n}\n"],"mappings":";AAsDA,IAAM,qBAAqB;AAS3B,IAAM,iBAGD;AAAA,EACH,EAAE,QAAQ,+BAA+B,MAAM,SAAS;AAAA,EACxD;AAAA,IACE,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AAAA,EACA,EAAE,QAAQ,sCAAsC,MAAM,WAAW;AAAA,EACjE,EAAE,QAAQ,wCAAwC,MAAM,aAAa;AAAA,EACrE,EAAE,QAAQ,yBAAyB,MAAM,aAAa;AAAA,EACtD,EAAE,QAAQ,0BAA0B,MAAM,iBAAiB;AAAA,EAC3D;AAAA,IACE,QAAQ;AAAA,IACR,MAAM;AAAA,EACR;AAAA,EACA,EAAE,QAAQ,uBAAuB,MAAM,WAAW;AACpD;AAeO,SAAS,eAA0C;AACxD,QAAM,IAAI;AACV,QAAM,WAAW,EAAE;AACnB,MAAI,UAAU;AACZ,WAAO;AAAA,EACT;AAEA,QAAM,KAAgC;AAAA,IACpC,QAAQ,oBAAI,IAAI;AAAA,IAChB,YAAY,CAAC;AAAA,IACb,UAAU,CAAC;AAAA,IACX,YAAY,CAAC;AAAA,IACb,YAAY,CAAC;AAAA,IACb,gBAAgB,CAAC;AAAA,IACjB,mBAAmB;AAAA,IACnB,mBAAmB,CAAC;AAAA,IACpB,UAAU,CAAC;AAAA,IACX,oBAAoB,CAAC;AAAA,IACrB,aAAa,CAAC;AAAA,EAChB;AAGA,QAAM,WAAW;AACjB,aAAW,EAAE,QAAQ,KAAK,KAAK,gBAAgB;AAC7C,UAAM,cAAe,EAA8B,MAAM;AACzD,QAAI,eAAe,MAAM;AACvB,eAAS,IAAI,IAAI;AAAA,IACnB;AACA,IAAC,EAA8B,MAAM,IAAI,GAAG,IAAI;AAAA,EAClD;AAIA,QAAM,UAAU;AAChB,aAAW,OAAO,OAAO,KAAK,OAAO,GAAG;AACtC,QAAI,IAAI,WAAW,kBAAkB,GAAG;AACtC,YAAM,SAAS,IAAI,MAAM,mBAAmB,MAAM;AAClD,SAAG,YAAY,MAAM,IAAI,QAAQ,GAAG;AACpC,aAAO,QAAQ,GAAG;AAAA,IACpB;AAAA,EACF;AAEA,IAAE,wBAAwB;AAC1B,SAAO;AACT;","names":[]}
@@ -7,10 +7,10 @@ import {
7
7
  makeReactEmitter,
8
8
  preparePipeline,
9
9
  resolveNameFromSrc
10
- } from "./chunk-42N2ZLE2.js";
10
+ } from "./chunk-NZAB7REE.js";
11
11
  import {
12
12
  loadStaticRemoteComponent
13
- } from "./chunk-OO4AMJWO.js";
13
+ } from "./chunk-LQ7VQ74E.js";
14
14
  import {
15
15
  DEFAULT_COMPONENT_NAME,
16
16
  DEFAULT_ROUTE,
@@ -18,10 +18,10 @@ import {
18
18
  RUNTIME_WEBPACK,
19
19
  attrToProp,
20
20
  escapeString
21
- } from "./chunk-HNZVEIKN.js";
21
+ } from "./chunk-SJM7AAGU.js";
22
22
  import {
23
23
  getNamespace
24
- } from "./chunk-KEPHL25S.js";
24
+ } from "./chunk-D5GNZB6O.js";
25
25
  import {
26
26
  RemoteComponentsError,
27
27
  errorFromFailedFetch,
@@ -667,4 +667,4 @@ function ConsumeRemoteComponent({
667
667
  export {
668
668
  ConsumeRemoteComponent
669
669
  };
670
- //# sourceMappingURL=chunk-W5ESPGHH.js.map
670
+ //# sourceMappingURL=chunk-GBFUPMMI.js.map
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunk6IUP26UKcjs = require('./chunk-6IUP26UK.cjs');
3
+ var _chunkLCXO7BUYcjs = require('./chunk-LCXO7BUY.cjs');
4
4
 
5
5
 
6
6
 
7
- var _chunkF44NODUScjs = require('./chunk-F44NODUS.cjs');
7
+ var _chunkRJW3EZJPcjs = require('./chunk-RJW3EZJP.cjs');
8
8
 
9
9
 
10
10
 
11
- var _chunkXCFYWSLDcjs = require('./chunk-XCFYWSLD.cjs');
11
+ var _chunkT64P7BAGcjs = require('./chunk-T64P7BAG.cjs');
12
12
 
13
13
 
14
- var _chunkCREXMFMFcjs = require('./chunk-CREXMFMF.cjs');
14
+ var _chunkTZT7DLO5cjs = require('./chunk-TZT7DLO5.cjs');
15
15
 
16
16
 
17
17
 
@@ -23,7 +23,7 @@ var _chunkCREXMFMFcjs = require('./chunk-CREXMFMF.cjs');
23
23
 
24
24
 
25
25
 
26
- var _chunkR4QFK5TNcjs = require('./chunk-R4QFK5TN.cjs');
26
+ var _chunkX6W464D6cjs = require('./chunk-X6W464D6.cjs');
27
27
 
28
28
 
29
29
 
@@ -285,12 +285,12 @@ function toComponentType(value) {
285
285
  return value && isComponentType(value) ? value : "unknown";
286
286
  }
287
287
  function buildMetadata(attrs, url) {
288
- const id = attrs.id || _chunkR4QFK5TNcjs.DEFAULT_COMPONENT_NAME;
289
- const bundle = attrs.bundle || process.env.NEXT_PUBLIC_MFE_CURRENT_APPLICATION || _chunkR4QFK5TNcjs.DEFAULT_BUNDLE_NAME;
288
+ const id = attrs.id || _chunkX6W464D6cjs.DEFAULT_COMPONENT_NAME;
289
+ const bundle = attrs.bundle || process.env.NEXT_PUBLIC_MFE_CURRENT_APPLICATION || _chunkX6W464D6cjs.DEFAULT_BUNDLE_NAME;
290
290
  return {
291
291
  name: attrs.name || id.replace(/_ssr$/, ""),
292
292
  bundle,
293
- route: attrs.route || url.pathname || _chunkR4QFK5TNcjs.DEFAULT_ROUTE,
293
+ route: attrs.route || url.pathname || _chunkX6W464D6cjs.DEFAULT_ROUTE,
294
294
  runtime: toRuntime(attrs.runtime),
295
295
  id,
296
296
  type: toComponentType(attrs.type)
@@ -329,7 +329,7 @@ function extractRemoteShared(doc, name, nextData) {
329
329
  function validateComponentFound(component, rsc, nextData, isRemoteComponent, url, name) {
330
330
  if (!component || !(rsc || nextData || isRemoteComponent)) {
331
331
  throw new (0, _chunkRUWR74XQcjs.RemoteComponentsError)(
332
- `Remote Component not found on ${url}.${name !== _chunkR4QFK5TNcjs.DEFAULT_COMPONENT_NAME ? ` The name for the <RemoteComponent> is "${name}". Check <RemoteComponent> usage.` : ""} Did you forget to wrap the content in <RemoteComponent>?`
332
+ `Remote Component not found on ${url}.${name !== _chunkX6W464D6cjs.DEFAULT_COMPONENT_NAME ? ` The name for the <RemoteComponent> is "${name}". Check <RemoteComponent> usage.` : ""} Did you forget to wrap the content in <RemoteComponent>?`
333
333
  );
334
334
  }
335
335
  }
@@ -360,7 +360,7 @@ function parseRemoteComponentDocument(doc, name, url) {
360
360
  name: resolvedName,
361
361
  bundle: _optionalChain([component, 'optionalAccess', _34 => _34.getAttribute, 'call', _35 => _35(DATA_BUNDLE)]) || _optionalChain([nextData, 'optionalAccess', _36 => _36.props, 'access', _37 => _37.__REMOTE_COMPONENT__, 'optionalAccess', _38 => _38.bundle]),
362
362
  route: _nullishCoalesce(_optionalChain([component, 'optionalAccess', _39 => _39.getAttribute, 'call', _40 => _40(DATA_ROUTE)]), () => ( _optionalChain([nextData, 'optionalAccess', _41 => _41.page]))),
363
- runtime: _nullishCoalesce(_nullishCoalesce(_optionalChain([component, 'optionalAccess', _42 => _42.getAttribute, 'call', _43 => _43(DATA_RUNTIME)]), () => ( _optionalChain([nextData, 'optionalAccess', _44 => _44.props, 'access', _45 => _45.__REMOTE_COMPONENT__, 'optionalAccess', _46 => _46.runtime]))), () => ( _chunkR4QFK5TNcjs.RUNTIME_SCRIPT)),
363
+ runtime: _nullishCoalesce(_nullishCoalesce(_optionalChain([component, 'optionalAccess', _42 => _42.getAttribute, 'call', _43 => _43(DATA_RUNTIME)]), () => ( _optionalChain([nextData, 'optionalAccess', _44 => _44.props, 'access', _45 => _45.__REMOTE_COMPONENT__, 'optionalAccess', _46 => _46.runtime]))), () => ( _chunkX6W464D6cjs.RUNTIME_SCRIPT)),
364
364
  id: _optionalChain([component, 'optionalAccess', _47 => _47.getAttribute, 'call', _48 => _48("id")]),
365
365
  type: _optionalChain([component, 'optionalAccess', _49 => _49.getAttribute, 'call', _50 => _50(DATA_TYPE)])
366
366
  },
@@ -430,7 +430,7 @@ async function loadRemoteComponent({
430
430
  self.__DISABLE_WEBPACK_EXEC__ = {};
431
431
  }
432
432
  self.__DISABLE_WEBPACK_EXEC__[bundle] = true;
433
- await _chunk6IUP26UKcjs.loadScripts.call(void 0, scripts, resolveClientUrl);
433
+ await _chunkLCXO7BUYcjs.loadScripts.call(void 0, scripts, resolveClientUrl);
434
434
  }
435
435
  const hostShared = await shared;
436
436
  _chunkRUWR74XQcjs.logDebug.call(void 0,
@@ -445,7 +445,7 @@ async function loadRemoteComponent({
445
445
  "ComponentLoader",
446
446
  `Remote shared modules requested: ${JSON.stringify(remoteShared)}`
447
447
  );
448
- const scope = await _chunkF44NODUScjs.setupRemoteScope.call(void 0,
448
+ const scope = await _chunkRJW3EZJPcjs.setupRemoteScope.call(void 0,
449
449
  runtime,
450
450
  scripts,
451
451
  url,
@@ -453,14 +453,14 @@ async function loadRemoteComponent({
453
453
  resolveClientUrl
454
454
  );
455
455
  if (runtime === "turbopack") {
456
- await _chunkF44NODUScjs.initializeSharedModules.call(void 0,
456
+ await _chunkRJW3EZJPcjs.initializeSharedModules.call(void 0,
457
457
  scope,
458
- _chunkR4QFK5TNcjs.buildCoreShared.call(void 0, hostShared),
458
+ _chunkX6W464D6cjs.buildCoreShared.call(void 0, hostShared),
459
459
  remoteShared
460
460
  );
461
461
  }
462
462
  if (bundle) {
463
- const resolve = await _chunkR4QFK5TNcjs.buildWebpackResolve.call(void 0,
463
+ const resolve = await _chunkX6W464D6cjs.buildWebpackResolve.call(void 0,
464
464
  hostShared,
465
465
  remoteShared,
466
466
  bundle,
@@ -473,7 +473,7 @@ async function loadRemoteComponent({
473
473
  },
474
474
  "ComponentLoader"
475
475
  );
476
- _chunkXCFYWSLDcjs.applySharedModules.call(void 0, bundle, resolve);
476
+ _chunkT64P7BAGcjs.applySharedModules.call(void 0, bundle, resolve);
477
477
  } else {
478
478
  _chunkRUWR74XQcjs.logWarn.call(void 0,
479
479
  "ComponentLoader",
@@ -514,7 +514,7 @@ async function loadRSCComponent(rscName, data) {
514
514
  return { component };
515
515
  }
516
516
  function loadNextPagesComponent(bundle, route, nextData, name, container) {
517
- const { Component, App } = _chunkXCFYWSLDcjs.nextClientPagesLoader.call(void 0, bundle, route, container);
517
+ const { Component, App } = _chunkT64P7BAGcjs.nextClientPagesLoader.call(void 0, bundle, route, container);
518
518
  if (!Component) {
519
519
  throw new (0, _chunkRUWR74XQcjs.RemoteComponentsError)(
520
520
  `Remote Component "${name}" is trying to load the component for route "${route}" but it is not available.`
@@ -571,12 +571,12 @@ async function loadPrepared(input) {
571
571
  function buildScriptDescriptors(scripts, url) {
572
572
  return scripts.map((script) => {
573
573
  const scriptSrc = script.getAttribute("data-src") || script.getAttribute("src") || script.src;
574
- const { prefix, id: path } = _nullishCoalesce(_optionalChain([_chunkR4QFK5TNcjs.REMOTE_COMPONENT_REGEX, 'access', _51 => _51.exec, 'call', _52 => _52(scriptSrc), 'optionalAccess', _53 => _53.groups]), () => ( {
574
+ const { prefix, id: path } = _nullishCoalesce(_optionalChain([_chunkX6W464D6cjs.REMOTE_COMPONENT_REGEX, 'access', _51 => _51.exec, 'call', _52 => _52(scriptSrc), 'optionalAccess', _53 => _53.groups]), () => ( {
575
575
  prefix: void 0,
576
576
  id: scriptSrc
577
577
  }));
578
578
  return {
579
- src: new URL(_chunkR4QFK5TNcjs.collapseDoubleSlashes.call(void 0, `${_nullishCoalesce(prefix, () => ( ""))}${path}`), url).href
579
+ src: new URL(_chunkX6W464D6cjs.collapseDoubleSlashes.call(void 0, `${_nullishCoalesce(prefix, () => ( ""))}${path}`), url).href
580
580
  };
581
581
  });
582
582
  }
@@ -585,7 +585,7 @@ async function loadStaticPath(input) {
585
585
  const scripts = Array.from(
586
586
  parsed.component.querySelectorAll("script")
587
587
  );
588
- const { mount, unmount } = await _chunkCREXMFMFcjs.loadStaticRemoteComponent.call(void 0,
588
+ const { mount, unmount } = await _chunkTZT7DLO5cjs.loadStaticRemoteComponent.call(void 0,
589
589
  scripts,
590
590
  url,
591
591
  resolveClientUrl
@@ -609,7 +609,7 @@ async function loadDynamicPath(input) {
609
609
  resolveClientUrl,
610
610
  container
611
611
  } = input;
612
- const rscName = _nullishCoalesce(input.rscName, () => ( (parsed.rsc ? `__remote_component_rsc_${_chunkR4QFK5TNcjs.escapeString.call(void 0, url.href)}_${_chunkR4QFK5TNcjs.escapeString.call(void 0, parsed.name)}` : void 0)));
612
+ const rscName = _nullishCoalesce(input.rscName, () => ( (parsed.rsc ? `__remote_component_rsc_${_chunkX6W464D6cjs.escapeString.call(void 0, url.href)}_${_chunkX6W464D6cjs.escapeString.call(void 0, parsed.name)}` : void 0)));
613
613
  const rscData = parsed.rsc ? (parsed.rsc.textContent || "").split("\n").filter(Boolean) : [];
614
614
  const result = await loadRemoteComponent({
615
615
  url,
@@ -621,7 +621,7 @@ async function loadDynamicPath(input) {
621
621
  data: rscData,
622
622
  nextData: parsed.nextData,
623
623
  scripts: scriptDescriptors,
624
- shared: _chunkR4QFK5TNcjs.buildHostShared.call(void 0, shared, resolveClientUrl),
624
+ shared: _chunkX6W464D6cjs.buildHostShared.call(void 0, shared, resolveClientUrl),
625
625
  remoteShared: parsed.remoteShared,
626
626
  container,
627
627
  resolveClientUrl
@@ -700,4 +700,4 @@ function bindResolveClientUrl(prop, remoteSrc) {
700
700
 
701
701
 
702
702
  exports.fetchWithHooks = fetchWithHooks; exports.getClientOrServerUrl = getClientOrServerUrl; exports.makeReactEmitter = makeReactEmitter; exports.makeEventEmitter = makeEventEmitter; exports.createRSCStream = createRSCStream; exports.preparePipeline = preparePipeline; exports.loadPrepared = loadPrepared; exports.createHostState = createHostState; exports.resolveNameFromSrc = resolveNameFromSrc; exports.bindResolveClientUrl = bindResolveClientUrl;
703
- //# sourceMappingURL=chunk-ER73O65F.cjs.map
703
+ //# sourceMappingURL=chunk-I47KE3EC.cjs.map
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkR4QFK5TNcjs = require('./chunk-R4QFK5TN.cjs');
3
+ var _chunkX6W464D6cjs = require('./chunk-X6W464D6.cjs');
4
4
 
5
5
 
6
6
 
@@ -17,7 +17,7 @@ async function loadScripts(scripts, resolveClientUrl) {
17
17
  return new Promise((resolve, reject) => {
18
18
  const newSrc = new URL(
19
19
  // remove the remote component bundle name identifier from the script src
20
- script.src.replace(_chunkR4QFK5TNcjs.NEXT_BUNDLE_PATH_RE, "/_next/"),
20
+ script.src.replace(_chunkX6W464D6cjs.NEXT_BUNDLE_PATH_RE, "/_next/"),
21
21
  location.origin
22
22
  ).href;
23
23
  const resolvedSrc = _nullishCoalesce(_optionalChain([resolveClientUrl, 'optionalCall', _ => _(newSrc)]), () => ( newSrc));
@@ -54,4 +54,4 @@ async function loadScripts(scripts, resolveClientUrl) {
54
54
 
55
55
 
56
56
  exports.loadScripts = loadScripts;
57
- //# sourceMappingURL=chunk-6IUP26UK.cjs.map
57
+ //# sourceMappingURL=chunk-LCXO7BUY.cjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getNamespace
3
- } from "./chunk-KEPHL25S.js";
3
+ } from "./chunk-D5GNZB6O.js";
4
4
  import {
5
5
  logError,
6
6
  warnCrossOriginFetchError
@@ -152,4 +152,4 @@ async function loadStaticRemoteComponent(scripts, url, resolveClientUrl) {
152
152
  export {
153
153
  loadStaticRemoteComponent
154
154
  };
155
- //# sourceMappingURL=chunk-OO4AMJWO.js.map
155
+ //# sourceMappingURL=chunk-LQ7VQ74E.js.map
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  loadScripts
3
- } from "./chunk-ZPMTZ3KJ.js";
3
+ } from "./chunk-SZFCBE54.js";
4
4
  import {
5
5
  initializeSharedModules,
6
6
  setupRemoteScope
7
- } from "./chunk-KYJWRZ2B.js";
7
+ } from "./chunk-QKB74MLO.js";
8
8
  import {
9
9
  applySharedModules,
10
10
  nextClientPagesLoader
11
- } from "./chunk-2VQGCACH.js";
11
+ } from "./chunk-52BJ7VFA.js";
12
12
  import {
13
13
  loadStaticRemoteComponent
14
- } from "./chunk-OO4AMJWO.js";
14
+ } from "./chunk-LQ7VQ74E.js";
15
15
  import {
16
16
  DEFAULT_BUNDLE_NAME,
17
17
  DEFAULT_COMPONENT_NAME,
@@ -23,7 +23,7 @@ import {
23
23
  buildWebpackResolve,
24
24
  collapseDoubleSlashes,
25
25
  escapeString
26
- } from "./chunk-HNZVEIKN.js";
26
+ } from "./chunk-SJM7AAGU.js";
27
27
  import {
28
28
  RemoteComponentsError,
29
29
  logDebug,
@@ -700,4 +700,4 @@ export {
700
700
  resolveNameFromSrc,
701
701
  bindResolveClientUrl
702
702
  };
703
- //# sourceMappingURL=chunk-42N2ZLE2.js.map
703
+ //# sourceMappingURL=chunk-NZAB7REE.js.map