remote-components 0.3.4 → 0.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-63L5THIQ.js +12 -0
- package/dist/app-63L5THIQ.js.map +1 -0
- package/dist/app-A5QE7XRH.cjs +12 -0
- package/dist/app-A5QE7XRH.cjs.map +1 -0
- package/dist/chunk-2VQGCACH.js +190 -0
- package/dist/chunk-2VQGCACH.js.map +1 -0
- package/dist/chunk-42N2ZLE2.js +703 -0
- package/dist/chunk-42N2ZLE2.js.map +1 -0
- package/dist/chunk-6IUP26UK.cjs +57 -0
- package/dist/chunk-6IUP26UK.cjs.map +1 -0
- package/dist/chunk-7MVFHOIP.cjs +60 -0
- package/dist/chunk-7MVFHOIP.cjs.map +1 -0
- package/dist/chunk-CREXMFMF.cjs +155 -0
- package/dist/chunk-CREXMFMF.cjs.map +1 -0
- package/dist/chunk-CTUJSWCM.js +215 -0
- package/dist/chunk-CTUJSWCM.js.map +1 -0
- package/dist/chunk-ENYGL5CO.js +11 -0
- package/dist/chunk-ENYGL5CO.js.map +1 -0
- package/dist/chunk-ER73O65F.cjs +703 -0
- package/dist/chunk-ER73O65F.cjs.map +1 -0
- package/dist/chunk-F44NODUS.cjs +709 -0
- package/dist/chunk-F44NODUS.cjs.map +1 -0
- package/dist/chunk-GAXJTFBV.js +20 -0
- package/dist/chunk-GAXJTFBV.js.map +1 -0
- package/dist/chunk-HNZVEIKN.js +358 -0
- package/dist/chunk-HNZVEIKN.js.map +1 -0
- package/dist/chunk-KE7QPAQ4.cjs +21 -0
- package/dist/chunk-KE7QPAQ4.cjs.map +1 -0
- package/dist/chunk-KEPHL25S.js +60 -0
- package/dist/chunk-KEPHL25S.js.map +1 -0
- package/dist/chunk-KKBEMQU7.cjs +670 -0
- package/dist/chunk-KKBEMQU7.cjs.map +1 -0
- package/dist/chunk-KYJWRZ2B.js +709 -0
- package/dist/chunk-KYJWRZ2B.js.map +1 -0
- package/dist/chunk-N5VQR2PW.cjs +215 -0
- package/dist/chunk-N5VQR2PW.cjs.map +1 -0
- package/dist/chunk-OO4AMJWO.js +155 -0
- package/dist/chunk-OO4AMJWO.js.map +1 -0
- package/dist/chunk-R4QFK5TN.cjs +358 -0
- package/dist/chunk-R4QFK5TN.cjs.map +1 -0
- package/dist/chunk-RUWR74XQ.cjs +152 -0
- package/dist/chunk-RUWR74XQ.cjs.map +1 -0
- package/dist/chunk-S2A4TFLS.js +152 -0
- package/dist/chunk-S2A4TFLS.js.map +1 -0
- package/dist/chunk-SHFJ5OQA.cjs +11 -0
- package/dist/chunk-SHFJ5OQA.cjs.map +1 -0
- package/dist/chunk-TCFLEBQM.cjs +20 -0
- package/dist/chunk-TCFLEBQM.cjs.map +1 -0
- package/dist/chunk-W5ESPGHH.js +670 -0
- package/dist/chunk-W5ESPGHH.js.map +1 -0
- package/dist/chunk-X6YKUJKH.js +21 -0
- package/dist/chunk-X6YKUJKH.js.map +1 -0
- package/dist/chunk-XCFYWSLD.cjs +190 -0
- package/dist/chunk-XCFYWSLD.cjs.map +1 -0
- package/dist/chunk-ZPMTZ3KJ.js +57 -0
- package/dist/chunk-ZPMTZ3KJ.js.map +1 -0
- package/dist/config/nextjs.cjs +76 -351
- package/dist/config/nextjs.cjs.map +1 -1
- package/dist/config/nextjs.js +26 -266
- package/dist/config/nextjs.js.map +1 -1
- package/dist/config/webpack.cjs +12 -240
- package/dist/config/webpack.cjs.map +1 -1
- package/dist/config/webpack.js +6 -207
- package/dist/config/webpack.js.map +1 -1
- package/dist/host/html.cjs +139 -2447
- package/dist/host/html.cjs.map +1 -1
- package/dist/host/html.js +66 -2345
- package/dist/host/html.js.map +1 -1
- package/dist/host/nextjs/app/client-only.cjs +53 -2825
- package/dist/host/nextjs/app/client-only.cjs.map +1 -1
- package/dist/host/nextjs/app/client-only.js +31 -2780
- package/dist/host/nextjs/app/client-only.js.map +1 -1
- package/dist/host/nextjs/app.cjs +34 -2
- package/dist/host/nextjs/app.cjs.map +1 -1
- package/dist/host/nextjs/app.js +35 -3
- package/dist/host/nextjs/app.js.map +1 -1
- package/dist/host/proxy/client.cjs +8 -38
- package/dist/host/proxy/client.cjs.map +1 -1
- package/dist/host/proxy/client.js +4 -7
- package/dist/host/proxy/client.js.map +1 -1
- package/dist/host/proxy.cjs +19 -56
- package/dist/host/proxy.cjs.map +1 -1
- package/dist/host/proxy.js +8 -20
- package/dist/host/proxy.js.map +1 -1
- package/dist/host/react.cjs +17 -2756
- package/dist/host/react.cjs.map +1 -1
- package/dist/host/react.js +13 -2723
- package/dist/host/react.js.map +1 -1
- package/dist/internal/host/nextjs/app-client.cjs +38 -24
- package/dist/internal/host/nextjs/app-client.cjs.map +1 -1
- package/dist/internal/host/nextjs/app-client.js +38 -24
- package/dist/internal/host/nextjs/app-client.js.map +1 -1
- package/dist/internal/host/nextjs/remote-component-links.cjs +24 -13
- package/dist/internal/host/nextjs/remote-component-links.cjs.map +1 -1
- package/dist/internal/host/nextjs/remote-component-links.d.ts +3 -0
- package/dist/internal/host/nextjs/remote-component-links.js +24 -13
- package/dist/internal/host/nextjs/remote-component-links.js.map +1 -1
- package/dist/internal/host/server/fetch-remote-component.cjs +1 -18
- package/dist/internal/host/server/fetch-remote-component.cjs.map +1 -1
- package/dist/internal/host/server/fetch-remote-component.js +1 -18
- package/dist/internal/host/server/fetch-remote-component.js.map +1 -1
- package/dist/internal/host/shared/lifecycle.cjs +69 -0
- package/dist/internal/host/shared/lifecycle.cjs.map +1 -0
- package/dist/internal/host/shared/lifecycle.d.ts +34 -0
- package/dist/internal/host/shared/lifecycle.js +44 -0
- package/dist/internal/host/shared/lifecycle.js.map +1 -0
- package/dist/internal/host/shared/pipeline.cjs +222 -0
- package/dist/internal/host/shared/pipeline.cjs.map +1 -0
- package/dist/internal/host/shared/pipeline.d.ts +153 -0
- package/dist/internal/host/shared/pipeline.js +200 -0
- package/dist/internal/host/shared/pipeline.js.map +1 -0
- package/dist/internal/runtime/loaders/component-loader.cjs +5 -2
- package/dist/internal/runtime/loaders/component-loader.cjs.map +1 -1
- package/dist/internal/runtime/loaders/component-loader.js +5 -2
- package/dist/internal/runtime/loaders/component-loader.js.map +1 -1
- package/dist/internal/runtime/turbopack/patterns.cjs +1 -1
- package/dist/internal/runtime/turbopack/patterns.cjs.map +1 -1
- package/dist/internal/runtime/turbopack/patterns.js +1 -1
- package/dist/internal/runtime/turbopack/patterns.js.map +1 -1
- package/dist/internal/runtime/turbopack/remote-scope-setup.cjs.map +1 -1
- package/dist/internal/runtime/turbopack/remote-scope-setup.js.map +1 -1
- package/dist/internal/runtime/turbopack/remote-scope.cjs +1 -5
- package/dist/internal/runtime/turbopack/remote-scope.cjs.map +1 -1
- package/dist/internal/runtime/turbopack/remote-scope.js +1 -5
- package/dist/internal/runtime/turbopack/remote-scope.js.map +1 -1
- package/dist/internal/utils.cjs +1 -1
- package/dist/internal/utils.cjs.map +1 -1
- package/dist/internal/utils.d.ts +5 -5
- package/dist/internal/utils.js +1 -1
- package/dist/internal/utils.js.map +1 -1
- package/dist/remote/html.cjs +15 -314
- package/dist/remote/html.cjs.map +1 -1
- package/dist/remote/html.js +7 -305
- package/dist/remote/html.js.map +1 -1
- package/dist/remote/middleware.cjs +16 -41
- package/dist/remote/middleware.cjs.map +1 -1
- package/dist/script-6W5JRBZK.cjs +26 -0
- package/dist/script-6W5JRBZK.cjs.map +1 -0
- package/dist/script-IFEBOLIA.js +26 -0
- package/dist/script-IFEBOLIA.js.map +1 -0
- package/dist/static-loader-X4TSF5KW.js +11 -0
- package/dist/static-loader-X4TSF5KW.js.map +1 -0
- package/dist/static-loader-ZYD5BO4D.cjs +11 -0
- package/dist/static-loader-ZYD5BO4D.cjs.map +1 -0
- package/dist/turbopack-NPGO3MWS.js +55 -0
- package/dist/turbopack-NPGO3MWS.js.map +1 -0
- package/dist/turbopack-WRMKPNN4.cjs +55 -0
- package/dist/turbopack-WRMKPNN4.cjs.map +1 -0
- package/dist/webpack-DUBHPYD6.js +92 -0
- package/dist/webpack-DUBHPYD6.js.map +1 -0
- package/dist/webpack-KSCMCL7M.cjs +92 -0
- package/dist/webpack-KSCMCL7M.cjs.map +1 -0
- package/package.json +10 -3
|
@@ -0,0 +1,709 @@
|
|
|
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
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
var _chunkR4QFK5TNcjs = require('./chunk-R4QFK5TN.cjs');
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
var _chunk7MVFHOIPcjs = require('./chunk-7MVFHOIP.cjs');
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
var _chunkRUWR74XQcjs = require('./chunk-RUWR74XQ.cjs');
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
var _chunkKE7QPAQ4cjs = require('./chunk-KE7QPAQ4.cjs');
|
|
26
|
+
|
|
27
|
+
// src/runtime/turbopack/patterns.ts
|
|
28
|
+
var MODULE_ID_PATTERN = '"[^"]+"|[0-9]+';
|
|
29
|
+
function stripQuotes(value) {
|
|
30
|
+
if (value.startsWith('"') && value.endsWith('"')) {
|
|
31
|
+
return value.slice(1, -1);
|
|
32
|
+
}
|
|
33
|
+
return value;
|
|
34
|
+
}
|
|
35
|
+
function extractGroup(re, input, group) {
|
|
36
|
+
const raw = _optionalChain([re, 'access', _ => _.exec, 'call', _2 => _2(input), 'optionalAccess', _3 => _3.groups, 'optionalAccess', _4 => _4[group]]);
|
|
37
|
+
return raw ? stripQuotes(raw) : void 0;
|
|
38
|
+
}
|
|
39
|
+
var REMOTE_SHARED_MARKER_RE = /(?:self|[a-z])\.TURBOPACK_REMOTE_SHARED/;
|
|
40
|
+
var REMOTE_SHARED_ASSIGNMENT_RE = new RegExp(
|
|
41
|
+
`\\.TURBOPACK_REMOTE_SHARED\\s*=\\s*await (?:__turbopack_context__|[a-z])\\.A\\((?<sharedModuleId>${MODULE_ID_PATTERN})\\)`
|
|
42
|
+
);
|
|
43
|
+
var ASYNC_MODULE_LOADER_RE = new RegExp(
|
|
44
|
+
`(?:__turbopack_context__|[a-z])\\.A\\((?<asyncSharedModuleId>${MODULE_ID_PATTERN})\\)`
|
|
45
|
+
);
|
|
46
|
+
var ASYNC_MODULE_CALLBACK_RE = new RegExp(
|
|
47
|
+
`(?:parentImport|[a-z])\\((?<sharedModuleId>${MODULE_ID_PATTERN})\\)`
|
|
48
|
+
);
|
|
49
|
+
var TURBOPACK_GLOBAL_RE = /(?:globalThis|self)\s*(?:\.TURBOPACK|\[\s*["']TURBOPACK["']\s*\])/;
|
|
50
|
+
|
|
51
|
+
// src/runtime/turbopack/chunk-loader.ts
|
|
52
|
+
function loadChunkWithScope(scope, chunkId) {
|
|
53
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
54
|
+
"ChunkLoader",
|
|
55
|
+
`loadChunkWithScope: "${chunkId}" (scope: "${scope.scopedName}")`
|
|
56
|
+
);
|
|
57
|
+
const self = globalThis;
|
|
58
|
+
const ns = _chunk7MVFHOIPcjs.getNamespace.call(void 0, );
|
|
59
|
+
const { bundle, path, prefix } = _chunkR4QFK5TNcjs.parseRemoteId.call(void 0, chunkId);
|
|
60
|
+
const remoteRuntime = _optionalChain([self, 'access', _5 => _5.__remote_webpack_require__, 'optionalAccess', _6 => _6[_nullishCoalesce(bundle, () => ( "default"))]]) ? _optionalChain([self, 'access', _7 => _7.__remote_webpack_require__, 'access', _8 => _8[_nullishCoalesce(bundle, () => ( "default"))], 'optionalAccess', _9 => _9.type]) || "webpack" : scope.runtime;
|
|
61
|
+
if (remoteRuntime === _chunkR4QFK5TNcjs.RUNTIME_WEBPACK) {
|
|
62
|
+
return Promise.resolve(void 0);
|
|
63
|
+
}
|
|
64
|
+
const rawPath = path ? _chunkR4QFK5TNcjs.collapseDoubleSlashes.call(void 0, `${prefix}${path}`) : "/";
|
|
65
|
+
const url = new URL(rawPath, scope.url).href;
|
|
66
|
+
if (url.endsWith(".css")) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
if (ns.chunkCache[url]) {
|
|
70
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0, "ChunkLoader", `Cache hit for "${chunkId}" (url="${url}")`);
|
|
71
|
+
return ns.chunkCache[url];
|
|
72
|
+
}
|
|
73
|
+
const resolvedUrl = _nullishCoalesce(_optionalChain([scope, 'access', _10 => _10.resolveClientUrl, 'optionalCall', _11 => _11(url)]), () => ( url));
|
|
74
|
+
if (resolvedUrl !== url) {
|
|
75
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0, "ChunkLoader", `Proxied chunk URL: "${url}" \u2192 "${resolvedUrl}"`);
|
|
76
|
+
}
|
|
77
|
+
ns.chunkCache[url] = new Promise((resolve, reject) => {
|
|
78
|
+
fetch(resolvedUrl).then((res) => res.text()).then((code) => {
|
|
79
|
+
const hasTurbopack = TURBOPACK_GLOBAL_RE.test(code);
|
|
80
|
+
if (hasTurbopack) {
|
|
81
|
+
return handleTurbopackChunk(code, scope, url);
|
|
82
|
+
}
|
|
83
|
+
}).then(resolve).catch((error) => {
|
|
84
|
+
const isProxied = _chunkKE7QPAQ4cjs.isProxiedUrl.call(void 0, resolvedUrl);
|
|
85
|
+
if (isProxied) {
|
|
86
|
+
reject(_chunkRUWR74XQcjs.failedProxiedAssetError.call(void 0, "chunk", url, resolvedUrl));
|
|
87
|
+
} else {
|
|
88
|
+
_chunkRUWR74XQcjs.warnCrossOriginFetchError.call(void 0, "ChunkLoader", url);
|
|
89
|
+
reject(error);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
return ns.chunkCache[url];
|
|
94
|
+
}
|
|
95
|
+
function createChunkDispatcher() {
|
|
96
|
+
return function __chunk_dispatcher__(chunkId, scriptBundle) {
|
|
97
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0, "ChunkDispatcher", `Dispatching chunk: "${chunkId}"`);
|
|
98
|
+
const { bundle } = _chunkR4QFK5TNcjs.parseRemoteId.call(void 0, chunkId);
|
|
99
|
+
const bundleName = bundle || scriptBundle || "default";
|
|
100
|
+
const scope = _chunkR4QFK5TNcjs.getScope.call(void 0, bundleName);
|
|
101
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
102
|
+
"ChunkDispatcher",
|
|
103
|
+
`Scope resolution: bundle="${bundleName}", scope=${_nullishCoalesce(_optionalChain([scope, 'optionalAccess', _12 => _12.scopedName]), () => ( "null"))}`
|
|
104
|
+
);
|
|
105
|
+
if (!scope) {
|
|
106
|
+
_chunkRUWR74XQcjs.logWarn.call(void 0, "ChunkDispatcher", `No scope found for bundle "${bundleName}"`);
|
|
107
|
+
return Promise.resolve(void 0);
|
|
108
|
+
}
|
|
109
|
+
return loadChunkWithScope(scope, chunkId);
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
async function handleTurbopackChunk(code, scope, url) {
|
|
113
|
+
if (/importScripts\(\.\.\.self.TURBOPACK_NEXT_CHUNK_URLS/.test(code)) {
|
|
114
|
+
const preloadLinks = document.querySelectorAll(
|
|
115
|
+
`link[rel="preload"][href="${new URL(url).pathname}"]`
|
|
116
|
+
);
|
|
117
|
+
preloadLinks.forEach((preloadLink) => preloadLink.remove());
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const self = globalThis;
|
|
121
|
+
const { globalKey } = scope;
|
|
122
|
+
const transformedCode = code.replace(
|
|
123
|
+
/globalThis\[\s*["']TURBOPACK["']\s*\]/g,
|
|
124
|
+
`globalThis["TURBOPACK_${globalKey}"]`
|
|
125
|
+
).replace(
|
|
126
|
+
/self\[\s*["']TURBOPACK["']\s*\]/g,
|
|
127
|
+
`self["TURBOPACK_${globalKey}"]`
|
|
128
|
+
).replace(/globalThis\.TURBOPACK/g, `globalThis.TURBOPACK_${globalKey}`).replace(/self\.TURBOPACK(?!_)/g, `self.TURBOPACK_${globalKey}`).replace(
|
|
129
|
+
/TURBOPACK_WORKER_LOCATION/g,
|
|
130
|
+
`TURBOPACK_WORKER_LOCATION_${globalKey}`
|
|
131
|
+
).replace(
|
|
132
|
+
/TURBOPACK_NEXT_CHUNK_URLS/g,
|
|
133
|
+
`TURBOPACK_NEXT_CHUNK_URLS_${globalKey}`
|
|
134
|
+
).replace(
|
|
135
|
+
/TURBOPACK_CHUNK_UPDATE_LISTENERS/g,
|
|
136
|
+
`TURBOPACK_CHUNK_UPDATE_LISTENERS_${globalKey}`
|
|
137
|
+
).replace(/__next_require__/g, `__${globalKey}_next_require__`).replace(
|
|
138
|
+
/\/\/# sourceMappingURL=(?<name>.+)(?<optional>\._)?\.js\.map/g,
|
|
139
|
+
`//# sourceMappingURL=${new URL(".", new URL(url, scope.url)).href}$1$2.js.map`
|
|
140
|
+
);
|
|
141
|
+
if (!self[`TURBOPACK_${globalKey}`]) {
|
|
142
|
+
const wrapPush = (target) => {
|
|
143
|
+
const originalPush = target.push;
|
|
144
|
+
if (typeof originalPush !== "function")
|
|
145
|
+
return target;
|
|
146
|
+
target.push = (...items) => {
|
|
147
|
+
for (const item of items) {
|
|
148
|
+
if (Array.isArray(item)) {
|
|
149
|
+
for (const entry of item) {
|
|
150
|
+
scope.turbopackModules.push(entry);
|
|
151
|
+
}
|
|
152
|
+
} else {
|
|
153
|
+
scope.turbopackModules.push(item);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return originalPush.apply(target, items);
|
|
157
|
+
};
|
|
158
|
+
return target;
|
|
159
|
+
};
|
|
160
|
+
const globalProp = `TURBOPACK_${globalKey}`;
|
|
161
|
+
let currentValue = wrapPush([]);
|
|
162
|
+
Object.defineProperty(self, globalProp, {
|
|
163
|
+
get() {
|
|
164
|
+
return currentValue;
|
|
165
|
+
},
|
|
166
|
+
set(newValue) {
|
|
167
|
+
if (newValue && typeof newValue === "object") {
|
|
168
|
+
wrapPush(newValue);
|
|
169
|
+
}
|
|
170
|
+
currentValue = newValue;
|
|
171
|
+
},
|
|
172
|
+
configurable: true,
|
|
173
|
+
enumerable: true
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
await new Promise((scriptResolve, scriptReject) => {
|
|
177
|
+
const blob = new Blob([transformedCode], {
|
|
178
|
+
type: "application/javascript; charset=UTF-8"
|
|
179
|
+
});
|
|
180
|
+
const scriptUrl = URL.createObjectURL(blob);
|
|
181
|
+
const script = document.createElement("script");
|
|
182
|
+
script.setAttribute("data-turbopack-src", url);
|
|
183
|
+
script.src = scriptUrl;
|
|
184
|
+
script.async = true;
|
|
185
|
+
script.onload = () => {
|
|
186
|
+
URL.revokeObjectURL(scriptUrl);
|
|
187
|
+
scriptResolve(void 0);
|
|
188
|
+
script.remove();
|
|
189
|
+
};
|
|
190
|
+
script.onerror = () => {
|
|
191
|
+
URL.revokeObjectURL(scriptUrl);
|
|
192
|
+
scriptReject(
|
|
193
|
+
new (0, _chunkRUWR74XQcjs.RemoteComponentsError)(
|
|
194
|
+
`Failed to load <script src="${script.src}"> for Remote Component. Check the URL is correct.`
|
|
195
|
+
)
|
|
196
|
+
);
|
|
197
|
+
script.remove();
|
|
198
|
+
};
|
|
199
|
+
document.head.appendChild(script);
|
|
200
|
+
});
|
|
201
|
+
const chunkLists = self[`TURBOPACK_${globalKey}_CHUNK_LISTS`];
|
|
202
|
+
const loadChunkPromises = [];
|
|
203
|
+
while (_optionalChain([chunkLists, 'optionalAccess', _13 => _13.length])) {
|
|
204
|
+
const { chunks } = _nullishCoalesce(chunkLists.shift(), () => ( { chunks: [] }));
|
|
205
|
+
if (chunks.length > 0) {
|
|
206
|
+
for (const id of chunks) {
|
|
207
|
+
const baseUrl = url.slice(0, url.indexOf("/_next"));
|
|
208
|
+
const chunkLoadResult = loadChunkWithScope(
|
|
209
|
+
scope,
|
|
210
|
+
_chunkR4QFK5TNcjs.formatRemoteId.call(void 0, scope, `${baseUrl}/_next/${id}`)
|
|
211
|
+
);
|
|
212
|
+
if (chunkLoadResult) {
|
|
213
|
+
loadChunkPromises.push(chunkLoadResult);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (loadChunkPromises.length > 0) {
|
|
219
|
+
await Promise.all(loadChunkPromises);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
// src/runtime/turbopack/module.ts
|
|
224
|
+
function requireModule(scope, moduleId, fullId) {
|
|
225
|
+
const idStr = String(moduleId);
|
|
226
|
+
if (scope.moduleCache[idStr])
|
|
227
|
+
return scope.moduleCache[idStr];
|
|
228
|
+
const sharedModule = getSharedModule(scope, moduleId);
|
|
229
|
+
if (sharedModule)
|
|
230
|
+
return sharedModule;
|
|
231
|
+
return handleTurbopackModule(
|
|
232
|
+
scope,
|
|
233
|
+
idStr,
|
|
234
|
+
_nullishCoalesce(fullId, () => ( _chunkR4QFK5TNcjs.formatRemoteId.call(void 0, scope, idStr)))
|
|
235
|
+
);
|
|
236
|
+
}
|
|
237
|
+
function handleTurbopackModule(scope, moduleId, id) {
|
|
238
|
+
if (scope.moduleCache[moduleId]) {
|
|
239
|
+
return scope.moduleCache[moduleId];
|
|
240
|
+
}
|
|
241
|
+
const modules = getTurbopackModules(scope);
|
|
242
|
+
if (!modules) {
|
|
243
|
+
_chunkRUWR74XQcjs.logError.call(void 0,
|
|
244
|
+
"TurbopackModule",
|
|
245
|
+
`TURBOPACK_${scope.globalKey} is undefined (scope: "${scope.scopedName}")`
|
|
246
|
+
);
|
|
247
|
+
}
|
|
248
|
+
const moduleInit = findModuleInit(modules, moduleId);
|
|
249
|
+
const exports = {};
|
|
250
|
+
const moduleExports = { exports };
|
|
251
|
+
if (typeof moduleInit !== "function") {
|
|
252
|
+
throw new Error(
|
|
253
|
+
`Module ${id} not found in bundle ${scope.name} with id ${moduleId}`
|
|
254
|
+
);
|
|
255
|
+
}
|
|
256
|
+
scope.moduleCache[moduleId] = moduleExports.exports;
|
|
257
|
+
moduleInit(
|
|
258
|
+
createTurbopackContext(
|
|
259
|
+
scope,
|
|
260
|
+
exports,
|
|
261
|
+
moduleExports,
|
|
262
|
+
modules,
|
|
263
|
+
moduleInit,
|
|
264
|
+
id
|
|
265
|
+
),
|
|
266
|
+
moduleExports,
|
|
267
|
+
exports
|
|
268
|
+
);
|
|
269
|
+
if (scope.moduleCache[moduleId] !== moduleExports.exports) {
|
|
270
|
+
scope.moduleCache[moduleId] = moduleExports.exports;
|
|
271
|
+
}
|
|
272
|
+
return moduleExports.exports;
|
|
273
|
+
}
|
|
274
|
+
function findModuleInit(modules, moduleId) {
|
|
275
|
+
if (!modules || typeof modules !== "object")
|
|
276
|
+
return;
|
|
277
|
+
if (!Array.isArray(modules)) {
|
|
278
|
+
const key = moduleId in modules ? moduleId : Object.keys(modules).find((k) => k.startsWith(moduleId));
|
|
279
|
+
return key !== void 0 ? modules[key] : void 0;
|
|
280
|
+
}
|
|
281
|
+
const flat = modules.flat();
|
|
282
|
+
let idx = flat.findIndex((e) => String(e) === String(moduleId));
|
|
283
|
+
if (idx < 0) {
|
|
284
|
+
idx = flat.findIndex(
|
|
285
|
+
(e) => typeof e === "string" && e.startsWith(moduleId)
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
if (idx >= 0) {
|
|
289
|
+
return flat.slice(idx + 1).find((e) => typeof e === "function");
|
|
290
|
+
}
|
|
291
|
+
for (const entry of flat) {
|
|
292
|
+
if (!entry || typeof entry !== "object")
|
|
293
|
+
continue;
|
|
294
|
+
const obj = entry;
|
|
295
|
+
if (moduleId in obj)
|
|
296
|
+
return obj[moduleId];
|
|
297
|
+
const prefixKey = Object.keys(obj).find((k) => k.startsWith(moduleId));
|
|
298
|
+
if (prefixKey)
|
|
299
|
+
return obj[prefixKey];
|
|
300
|
+
}
|
|
301
|
+
return void 0;
|
|
302
|
+
}
|
|
303
|
+
function createTurbopackContext(scope, exports, moduleExports, modules, moduleInit, id) {
|
|
304
|
+
const scopedRequire = (moduleId) => requireModule(scope, moduleId, _chunkR4QFK5TNcjs.formatRemoteId.call(void 0, scope, String(moduleId)));
|
|
305
|
+
return {
|
|
306
|
+
// HMR not implemented for Remote Components
|
|
307
|
+
k: {
|
|
308
|
+
register() {
|
|
309
|
+
},
|
|
310
|
+
registerExports() {
|
|
311
|
+
},
|
|
312
|
+
signature() {
|
|
313
|
+
return (fn) => fn;
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
// ESM exports setup
|
|
317
|
+
s(bindings, esmId) {
|
|
318
|
+
let mod = exports;
|
|
319
|
+
if (typeof esmId === "string" || typeof esmId === "number") {
|
|
320
|
+
if (!scope.moduleCache[esmId]) {
|
|
321
|
+
scope.moduleCache[esmId] = {};
|
|
322
|
+
}
|
|
323
|
+
mod = scope.moduleCache[esmId];
|
|
324
|
+
}
|
|
325
|
+
Object.defineProperty(mod, "__esModule", { value: true });
|
|
326
|
+
if (Array.isArray(bindings)) {
|
|
327
|
+
let i = 0;
|
|
328
|
+
while (i < bindings.length) {
|
|
329
|
+
const propName = bindings[i++];
|
|
330
|
+
const tagOrFunc = bindings[i++];
|
|
331
|
+
if (typeof tagOrFunc === "number") {
|
|
332
|
+
Object.defineProperty(mod, propName, {
|
|
333
|
+
value: bindings[i++],
|
|
334
|
+
enumerable: true,
|
|
335
|
+
writable: false
|
|
336
|
+
});
|
|
337
|
+
} else {
|
|
338
|
+
const getterFn = tagOrFunc;
|
|
339
|
+
if (typeof bindings[i] === "function") {
|
|
340
|
+
const setterFn = bindings[i++];
|
|
341
|
+
Object.defineProperty(mod, propName, {
|
|
342
|
+
get: getterFn,
|
|
343
|
+
set: setterFn,
|
|
344
|
+
enumerable: true
|
|
345
|
+
});
|
|
346
|
+
} else {
|
|
347
|
+
Object.defineProperty(mod, propName, {
|
|
348
|
+
get: getterFn,
|
|
349
|
+
enumerable: true
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
},
|
|
356
|
+
// import — resolves directly via scope, no global dispatch
|
|
357
|
+
i(importId) {
|
|
358
|
+
let mod;
|
|
359
|
+
if (typeof importId === "string") {
|
|
360
|
+
const { exportSource, exportName } = _nullishCoalesce(_optionalChain([/\s+<export (?<exportSource>.*?) as (?<exportName>.*?)>$/, 'access', _14 => _14.exec, 'call', _15 => _15(
|
|
361
|
+
importId
|
|
362
|
+
), 'optionalAccess', _16 => _16.groups]), () => ( {}));
|
|
363
|
+
const normalizedId = importId.replace(
|
|
364
|
+
/\s+<export(?<specifier>.*)>$/,
|
|
365
|
+
""
|
|
366
|
+
);
|
|
367
|
+
mod = scopedRequire(normalizedId);
|
|
368
|
+
if (mod && exportSource && exportName && (exportSource === "*" || typeof mod[exportSource] !== "undefined") && typeof mod[exportName] === "undefined") {
|
|
369
|
+
if (exportSource === "*") {
|
|
370
|
+
mod[exportName] = mod;
|
|
371
|
+
} else {
|
|
372
|
+
mod[exportName] = mod[exportSource];
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
} else {
|
|
376
|
+
mod = scopedRequire(importId);
|
|
377
|
+
}
|
|
378
|
+
if (typeof mod !== "object" || mod === null) {
|
|
379
|
+
mod = { default: mod };
|
|
380
|
+
} else if (!("default" in mod) && // ES module namespace objects have a null prototype, so calling
|
|
381
|
+
// mod.toString() directly throws. Use Object.prototype.toString
|
|
382
|
+
// to safely detect them.
|
|
383
|
+
Object.prototype.toString.call(mod) !== "[object Module]") {
|
|
384
|
+
try {
|
|
385
|
+
mod.default = mod;
|
|
386
|
+
} catch (e2) {
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
return mod;
|
|
390
|
+
},
|
|
391
|
+
// require — resolves directly via scope
|
|
392
|
+
r(requireId) {
|
|
393
|
+
return scopedRequire(requireId);
|
|
394
|
+
},
|
|
395
|
+
// value exports
|
|
396
|
+
v(value) {
|
|
397
|
+
if (typeof value === "function") {
|
|
398
|
+
exports.default = value((vid) => scopedRequire(vid));
|
|
399
|
+
} else {
|
|
400
|
+
moduleExports.exports = value;
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
// async module initializer
|
|
404
|
+
async a(mod) {
|
|
405
|
+
let result;
|
|
406
|
+
await mod(
|
|
407
|
+
() => {
|
|
408
|
+
},
|
|
409
|
+
(value) => result = value
|
|
410
|
+
);
|
|
411
|
+
exports.default = result;
|
|
412
|
+
},
|
|
413
|
+
// async module loader — resolves directly via scope
|
|
414
|
+
async A(Aid) {
|
|
415
|
+
const mod = scopedRequire(Aid);
|
|
416
|
+
return mod.default((parentId) => scopedRequire(parentId));
|
|
417
|
+
},
|
|
418
|
+
// dynamic import tracking — no-op for remote components
|
|
419
|
+
j() {
|
|
420
|
+
},
|
|
421
|
+
// chunk loader — loads directly via scope, no global dispatch
|
|
422
|
+
l(url) {
|
|
423
|
+
const flatModules = Array.isArray(modules) ? modules : [];
|
|
424
|
+
const moduleInitIndex = flatModules.indexOf(moduleInit);
|
|
425
|
+
if (moduleInitIndex !== -1) {
|
|
426
|
+
const scriptIndex = flatModules.slice(0, moduleInitIndex).findLastIndex((bundleEntry) => bundleEntry instanceof Element);
|
|
427
|
+
if (scriptIndex !== -1) {
|
|
428
|
+
const script = flatModules[scriptIndex];
|
|
429
|
+
const scriptSrc = script.getAttribute("data-turbopack-src") || "";
|
|
430
|
+
const nextIndex = scriptSrc.indexOf("/_next");
|
|
431
|
+
const baseUrl = nextIndex !== -1 ? scriptSrc.slice(0, nextIndex) : "";
|
|
432
|
+
const chunkUrl = `${baseUrl}/_next/${url}`;
|
|
433
|
+
return loadChunkWithScope(scope, _chunkR4QFK5TNcjs.formatRemoteId.call(void 0, scope, chunkUrl));
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
throw new Error(
|
|
437
|
+
`Failed to load Turbopack chunk "${url}" for module "${id}". Check the URL is correct.`
|
|
438
|
+
);
|
|
439
|
+
},
|
|
440
|
+
// globalThis substitute shared across all modules in this scope
|
|
441
|
+
g: scope.moduleGlobal,
|
|
442
|
+
m: moduleExports,
|
|
443
|
+
e: exports
|
|
444
|
+
};
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// src/runtime/turbopack/shared-modules.ts
|
|
448
|
+
var DEDUPLICATION_WARNING = "This module will not be deduplicated \u2014 the remote may load its own copy, which can cause duplicate instance errors (e.g. invalid hook calls if React is loaded twice).";
|
|
449
|
+
function getTurbopackModules(scope) {
|
|
450
|
+
if (scope.turbopackModules.length > 0) {
|
|
451
|
+
return scope.turbopackModules;
|
|
452
|
+
}
|
|
453
|
+
const self = globalThis;
|
|
454
|
+
const raw = self[`TURBOPACK_${scope.globalKey}`];
|
|
455
|
+
if (!raw)
|
|
456
|
+
return void 0;
|
|
457
|
+
if (Array.isArray(raw)) {
|
|
458
|
+
return raw.flat();
|
|
459
|
+
}
|
|
460
|
+
return Object.entries(raw).flat();
|
|
461
|
+
}
|
|
462
|
+
async function initializeSharedModules(scope, hostShared = {}, remoteShared = {}) {
|
|
463
|
+
const allModules = getTurbopackModules(scope);
|
|
464
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
465
|
+
"SharedModules",
|
|
466
|
+
`initializeSharedModules: scope="${scope.scopedName}", allModules=${allModules ? allModules.length : "null"}, hostShared=[${Object.keys(hostShared).join(", ")}], remoteShared=${JSON.stringify(remoteShared)}`
|
|
467
|
+
);
|
|
468
|
+
let sharedModuleInitializer = null;
|
|
469
|
+
if (allModules) {
|
|
470
|
+
const sharedModuleInitializerIndex = allModules.findIndex((idOrFunc) => {
|
|
471
|
+
if (typeof idOrFunc !== "function") {
|
|
472
|
+
return false;
|
|
473
|
+
}
|
|
474
|
+
const funcCode = idOrFunc.toString();
|
|
475
|
+
return REMOTE_SHARED_MARKER_RE.test(funcCode);
|
|
476
|
+
});
|
|
477
|
+
if (sharedModuleInitializerIndex > 0) {
|
|
478
|
+
const sharedModuleInitializerCode = allModules[sharedModuleInitializerIndex].toString();
|
|
479
|
+
const sharedModuleInitializerId = allModules[sharedModuleInitializerIndex - 1];
|
|
480
|
+
const sharedModuleId = extractGroup(
|
|
481
|
+
REMOTE_SHARED_ASSIGNMENT_RE,
|
|
482
|
+
sharedModuleInitializerCode,
|
|
483
|
+
"sharedModuleId"
|
|
484
|
+
);
|
|
485
|
+
if (sharedModuleId) {
|
|
486
|
+
const { default: sharedModuleInitializerInstance } = handleTurbopackModule(
|
|
487
|
+
scope,
|
|
488
|
+
sharedModuleId,
|
|
489
|
+
_chunkR4QFK5TNcjs.formatRemoteId.call(void 0, scope, String(sharedModuleInitializerId))
|
|
490
|
+
);
|
|
491
|
+
sharedModuleInitializer = sharedModuleInitializerInstance;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
if (sharedModuleInitializer) {
|
|
495
|
+
const { shared } = await sharedModuleInitializer;
|
|
496
|
+
const sharedModuleIds = extractSharedModuleIds(shared, scope);
|
|
497
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
498
|
+
"SharedModules",
|
|
499
|
+
`Resolved shared modules for scope="${scope.scopedName}": ${JSON.stringify(sharedModuleIds)}`
|
|
500
|
+
);
|
|
501
|
+
return Promise.all(
|
|
502
|
+
Object.entries(sharedModuleIds).map(async ([id, module]) => {
|
|
503
|
+
if (hostShared[module]) {
|
|
504
|
+
scope.sharedModules[id] = await hostShared[module](scope.name);
|
|
505
|
+
} else {
|
|
506
|
+
_chunkRUWR74XQcjs.logError.call(void 0,
|
|
507
|
+
"SharedModules",
|
|
508
|
+
`Host shared module "${module}" not found for ID ${id}. ${DEDUPLICATION_WARNING}`
|
|
509
|
+
);
|
|
510
|
+
}
|
|
511
|
+
})
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
_chunkRUWR74XQcjs.logWarn.call(void 0,
|
|
515
|
+
"SharedModules",
|
|
516
|
+
`No shared module initializer found in bundle for scope="${scope.scopedName}" \u2014 falling back to remoteShared mapping`
|
|
517
|
+
);
|
|
518
|
+
} else {
|
|
519
|
+
_chunkRUWR74XQcjs.logWarn.call(void 0,
|
|
520
|
+
"SharedModules",
|
|
521
|
+
`No TURBOPACK modules found for scope="${scope.scopedName}" (TURBOPACK_${scope.globalKey} is empty)`
|
|
522
|
+
);
|
|
523
|
+
}
|
|
524
|
+
return Promise.all(
|
|
525
|
+
Object.entries(remoteShared).map(async ([id, module]) => {
|
|
526
|
+
if (hostShared[module]) {
|
|
527
|
+
const normalizedId = id.replace("[app-ssr]", "[app-client]");
|
|
528
|
+
scope.sharedModules[normalizedId] = await hostShared[module](
|
|
529
|
+
scope.name
|
|
530
|
+
);
|
|
531
|
+
} else {
|
|
532
|
+
_chunkRUWR74XQcjs.logError.call(void 0,
|
|
533
|
+
"SharedModules",
|
|
534
|
+
`Shared module "${module}" not found for "${scope.name}". ${DEDUPLICATION_WARNING}`
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
})
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
function extractSharedModuleIds(shared, scope) {
|
|
541
|
+
return Object.entries(shared).filter(([, value]) => typeof value === "function").reduce((acc, [key, value]) => {
|
|
542
|
+
const asyncSharedModuleId = extractGroup(
|
|
543
|
+
ASYNC_MODULE_LOADER_RE,
|
|
544
|
+
value.toString(),
|
|
545
|
+
"asyncSharedModuleId"
|
|
546
|
+
);
|
|
547
|
+
if (asyncSharedModuleId) {
|
|
548
|
+
const asyncSharedModule = findModuleInit(
|
|
549
|
+
getTurbopackModules(scope),
|
|
550
|
+
asyncSharedModuleId
|
|
551
|
+
);
|
|
552
|
+
if (asyncSharedModule) {
|
|
553
|
+
const sharedModuleId = extractGroup(
|
|
554
|
+
ASYNC_MODULE_CALLBACK_RE,
|
|
555
|
+
asyncSharedModule.toString(),
|
|
556
|
+
"sharedModuleId"
|
|
557
|
+
);
|
|
558
|
+
acc[_nullishCoalesce(sharedModuleId, () => ( asyncSharedModuleId))] = key.replace(
|
|
559
|
+
"__remote_shared_module_",
|
|
560
|
+
""
|
|
561
|
+
);
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
return acc;
|
|
565
|
+
}, {});
|
|
566
|
+
}
|
|
567
|
+
function getSharedModule(scope, id) {
|
|
568
|
+
const idStr = String(id);
|
|
569
|
+
if (scope.sharedModules[idStr] !== void 0) {
|
|
570
|
+
return scope.sharedModules[idStr];
|
|
571
|
+
}
|
|
572
|
+
for (const [key, value] of Object.entries(scope.sharedModules)) {
|
|
573
|
+
if (typeof value !== "undefined" && idStr !== key && idStr.endsWith(key)) {
|
|
574
|
+
return value;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
return null;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// src/runtime/turbopack/remote-scope-setup.ts
|
|
581
|
+
async function setupRemoteScope(runtime, scripts = [], url = new URL(location.href), bundle, resolveClientUrl) {
|
|
582
|
+
const self = globalThis;
|
|
583
|
+
const ns = _chunk7MVFHOIPcjs.getNamespace.call(void 0, );
|
|
584
|
+
const bundleName = _nullishCoalesce(bundle, () => ( "default"));
|
|
585
|
+
const existingScope = _chunkR4QFK5TNcjs.getScope.call(void 0, bundleName);
|
|
586
|
+
if (existingScope && existingScope.url.origin === url.origin) {
|
|
587
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
588
|
+
"WebpackRuntime",
|
|
589
|
+
`Reusing scope "${existingScope.scopedName}" (turbopackModules=${existingScope.turbopackModules.length})`
|
|
590
|
+
);
|
|
591
|
+
existingScope.resolveClientUrl = resolveClientUrl;
|
|
592
|
+
if (runtime === _chunkR4QFK5TNcjs.RUNTIME_TURBOPACK) {
|
|
593
|
+
await Promise.allSettled(
|
|
594
|
+
scripts.map(
|
|
595
|
+
(script) => script.src ? loadChunkWithScope(existingScope, script.src) : Promise.resolve(void 0)
|
|
596
|
+
)
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
return existingScope;
|
|
600
|
+
}
|
|
601
|
+
const scope = _chunkR4QFK5TNcjs.createScope.call(void 0, bundleName, url, runtime, resolveClientUrl);
|
|
602
|
+
_chunkR4QFK5TNcjs.registerScope.call(void 0, scope);
|
|
603
|
+
if (runtime === _chunkR4QFK5TNcjs.RUNTIME_WEBPACK && _optionalChain([self, 'access', _17 => _17.__remote_webpack_require__, 'optionalAccess', _18 => _18[bundleName]])) {
|
|
604
|
+
scope.webpackRequire = self.__remote_webpack_require__[bundleName];
|
|
605
|
+
}
|
|
606
|
+
ns.bundleUrls[bundleName] = url;
|
|
607
|
+
if (scope.scopedName !== bundleName) {
|
|
608
|
+
ns.bundleUrls[scope.scopedName] = url;
|
|
609
|
+
}
|
|
610
|
+
self.__webpack_get_script_filename__ = () => null;
|
|
611
|
+
const willCreateDispatchers = typeof self.__webpack_require__ !== "function" || ns.dispatcherRuntime !== "turbopack";
|
|
612
|
+
if (willCreateDispatchers) {
|
|
613
|
+
if (!self.__original_webpack_require__ && !self.__original_webpack_chunk_load__) {
|
|
614
|
+
self.__original_webpack_chunk_load__ = self.__webpack_chunk_load__;
|
|
615
|
+
self.__original_webpack_require__ = self.__webpack_require__;
|
|
616
|
+
}
|
|
617
|
+
self.__webpack_chunk_load__ = createChunkDispatcher();
|
|
618
|
+
self.__webpack_require__ = createModuleDispatcher(runtime);
|
|
619
|
+
ns.dispatcherRuntime = runtime;
|
|
620
|
+
self.__webpack_require_type__ = runtime;
|
|
621
|
+
if (self.__remote_webpack_require__ && runtime === _chunkR4QFK5TNcjs.RUNTIME_TURBOPACK) {
|
|
622
|
+
self.__remote_webpack_require__[bundleName] = self.__webpack_require__;
|
|
623
|
+
self.__remote_webpack_require__[bundleName].type = "turbopack";
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
if (_optionalChain([self, 'access', _19 => _19.__remote_webpack_require__, 'optionalAccess', _20 => _20[bundleName]]) && scope.scopedName !== bundleName) {
|
|
627
|
+
self.__remote_webpack_require__[scope.scopedName] = self.__remote_webpack_require__[bundleName];
|
|
628
|
+
}
|
|
629
|
+
if (runtime === _chunkR4QFK5TNcjs.RUNTIME_TURBOPACK) {
|
|
630
|
+
const results = await Promise.allSettled(
|
|
631
|
+
scripts.map((script) => {
|
|
632
|
+
if (script.src) {
|
|
633
|
+
return loadChunkWithScope(scope, script.src);
|
|
634
|
+
}
|
|
635
|
+
return Promise.resolve(void 0);
|
|
636
|
+
})
|
|
637
|
+
);
|
|
638
|
+
for (const result of results) {
|
|
639
|
+
if (result.status === "rejected") {
|
|
640
|
+
_chunkRUWR74XQcjs.logWarn.call(void 0,
|
|
641
|
+
"WebpackRuntime",
|
|
642
|
+
`Initial chunk load failed: ${String(result.reason)}`
|
|
643
|
+
);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
return scope;
|
|
648
|
+
}
|
|
649
|
+
function createModuleDispatcher(runtime) {
|
|
650
|
+
return (id) => {
|
|
651
|
+
const self = globalThis;
|
|
652
|
+
const { bundle, id: moduleId } = _nullishCoalesce(_optionalChain([id, 'access', _21 => _21.match, 'call', _22 => _22(_chunkR4QFK5TNcjs.REMOTE_COMPONENT_REGEX), 'optionalAccess', _23 => _23.groups]), () => ( {
|
|
653
|
+
bundle: "default",
|
|
654
|
+
id
|
|
655
|
+
}));
|
|
656
|
+
const bundleName = _nullishCoalesce(bundle, () => ( "default"));
|
|
657
|
+
const remoteRuntime = _optionalChain([self, 'access', _24 => _24.__remote_webpack_require__, 'optionalAccess', _25 => _25[bundleName]]) ? _optionalChain([self, 'access', _26 => _26.__remote_webpack_require__, 'access', _27 => _27[bundleName], 'optionalAccess', _28 => _28.type]) || "webpack" : runtime;
|
|
658
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
659
|
+
"ModuleDispatcher",
|
|
660
|
+
`Resolving "${id}" (bundle: "${bundleName}", runtime: "${remoteRuntime}")`
|
|
661
|
+
);
|
|
662
|
+
try {
|
|
663
|
+
if (remoteRuntime === _chunkR4QFK5TNcjs.RUNTIME_WEBPACK && bundle && moduleId) {
|
|
664
|
+
const scope2 = _chunkR4QFK5TNcjs.getScope.call(void 0, bundle);
|
|
665
|
+
if (_optionalChain([scope2, 'optionalAccess', _29 => _29.webpackRequire]))
|
|
666
|
+
return scope2.webpackRequire(moduleId);
|
|
667
|
+
return _optionalChain([self, 'access', _30 => _30.__remote_webpack_require__, 'optionalAccess', _31 => _31[bundle], 'optionalCall', _32 => _32(moduleId)]);
|
|
668
|
+
}
|
|
669
|
+
const scope = _chunkR4QFK5TNcjs.getScope.call(void 0, bundleName);
|
|
670
|
+
if (scope) {
|
|
671
|
+
return requireModule(scope, _nullishCoalesce(moduleId, () => ( id)), id);
|
|
672
|
+
}
|
|
673
|
+
throw new Error(
|
|
674
|
+
`Module "${id}" not found \u2014 no scope for bundle "${bundleName}".`
|
|
675
|
+
);
|
|
676
|
+
} catch (requireError) {
|
|
677
|
+
_chunkRUWR74XQcjs.logWarn.call(void 0,
|
|
678
|
+
"ModuleDispatcher",
|
|
679
|
+
`Module require failed: ${String(requireError)}`
|
|
680
|
+
);
|
|
681
|
+
if (typeof self.__original_webpack_require__ !== "function") {
|
|
682
|
+
throw new (0, _chunkRUWR74XQcjs.RemoteComponentsError)(
|
|
683
|
+
`Module "${id}" not found in remote component bundle "${bundleName}".`,
|
|
684
|
+
{
|
|
685
|
+
cause: requireError instanceof Error ? requireError : void 0
|
|
686
|
+
}
|
|
687
|
+
);
|
|
688
|
+
}
|
|
689
|
+
try {
|
|
690
|
+
_chunkRUWR74XQcjs.logDebug.call(void 0,
|
|
691
|
+
"ModuleDispatcher",
|
|
692
|
+
"Falling back to original webpack require"
|
|
693
|
+
);
|
|
694
|
+
return self.__original_webpack_require__(id);
|
|
695
|
+
} catch (originalError) {
|
|
696
|
+
throw new (0, _chunkRUWR74XQcjs.RemoteComponentsError)(
|
|
697
|
+
`Module "${id}" not found in remote component bundle "${bundleName}".`,
|
|
698
|
+
{ cause: originalError instanceof Error ? originalError : void 0 }
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
|
|
707
|
+
|
|
708
|
+
exports.initializeSharedModules = initializeSharedModules; exports.setupRemoteScope = setupRemoteScope;
|
|
709
|
+
//# sourceMappingURL=chunk-F44NODUS.cjs.map
|