one 2.20.1 → 2.21.0
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/cjs/index.cjs +2 -0
- package/dist/cjs/index.native.cjs +2 -0
- package/dist/cjs/index.native.js +2 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/link/linking.native.cjs +1 -1
- package/dist/cjs/link/linking.native.js +1 -1
- package/dist/cjs/link/linking.native.js.map +1 -1
- package/dist/cjs/router/router.cjs +4 -1
- package/dist/cjs/router/router.native.cjs +4 -1
- package/dist/cjs/router/router.native.js +4 -1
- package/dist/cjs/router/router.native.js.map +1 -1
- package/dist/cjs/router/warmState.cjs +62 -4
- package/dist/cjs/router/warmState.native.cjs +78 -5
- package/dist/cjs/router/warmState.native.js +78 -5
- package/dist/cjs/router/warmState.native.js.map +1 -1
- package/dist/cjs/router/warmStatePlatform.native.cjs +1 -1
- package/dist/cjs/router/warmStatePlatform.native.js +1 -1
- package/dist/cjs/router/warmStatePlatform.native.js.map +1 -1
- package/dist/cjs/useIsRestored.cjs +30 -0
- package/dist/cjs/useIsRestored.native.cjs +32 -0
- package/dist/cjs/useIsRestored.native.js +34 -0
- package/dist/cjs/useIsRestored.native.js.map +1 -0
- package/dist/cjs/vite/one.cjs +1 -1
- package/dist/cjs/vite/one.native.cjs +8 -8
- package/dist/cjs/vite/one.native.js +8 -8
- package/dist/cjs/vite/one.native.js.map +1 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/index.native.js +2 -1
- package/dist/esm/link/linking.native.js +1 -1
- package/dist/esm/link/linking.native.js.map +1 -1
- package/dist/esm/router/router.mjs +5 -2
- package/dist/esm/router/router.mjs.map +1 -1
- package/dist/esm/router/router.native.js +5 -2
- package/dist/esm/router/router.native.js.map +1 -1
- package/dist/esm/router/warmState.mjs +61 -5
- package/dist/esm/router/warmState.mjs.map +1 -1
- package/dist/esm/router/warmState.native.js +77 -6
- package/dist/esm/router/warmState.native.js.map +1 -1
- package/dist/esm/router/warmStatePlatform.native.js +1 -1
- package/dist/esm/router/warmStatePlatform.native.js.map +1 -1
- package/dist/esm/useIsRestored.mjs +11 -0
- package/dist/esm/useIsRestored.mjs.map +1 -0
- package/dist/esm/useIsRestored.native.js +11 -0
- package/dist/esm/useIsRestored.native.js.map +1 -0
- package/dist/esm/vite/one.mjs +1 -1
- package/dist/esm/vite/one.mjs.map +1 -1
- package/dist/esm/vite/one.native.js +8 -8
- package/dist/esm/vite/one.native.js.map +1 -1
- package/package.json +13 -13
- package/src/index.ts +2 -0
- package/src/link/linking.native.ts +3 -3
- package/src/router/Route.tsx +13 -0
- package/src/router/router.ts +3 -1
- package/src/router/warmState.test.ts +80 -0
- package/src/router/warmState.ts +80 -8
- package/src/router/warmStatePlatform.native.ts +3 -1
- package/src/useIsRestored.ts +11 -0
- package/src/vite/one.ts +1 -1
- package/src/vite/types.ts +5 -0
- package/types/index.d.ts +2 -0
- package/types/index.d.ts.map +1 -1
- package/types/router/Route.d.ts +10 -0
- package/types/router/Route.d.ts.map +1 -1
- package/types/router/router.d.ts.map +1 -1
- package/types/router/warmState.d.ts +2 -0
- package/types/router/warmState.d.ts.map +1 -1
- package/types/router/warmStatePlatform.native.d.ts.map +1 -1
- package/types/useIsRestored.d.ts +6 -0
- package/types/useIsRestored.d.ts.map +1 -0
- package/types/vite/types.d.ts +5 -0
- package/types/vite/types.d.ts.map +1 -1
|
@@ -29,6 +29,7 @@ __export(warmState_exports, {
|
|
|
29
29
|
flushWarmState: () => flushWarmState,
|
|
30
30
|
getHydratedWarmState: () => getHydratedWarmState,
|
|
31
31
|
hydrateWarmInitialLoad: () => hydrateWarmInitialLoad,
|
|
32
|
+
isRestoredLaunch: () => isRestoredLaunch,
|
|
32
33
|
isWarmRouteApplied: () => isWarmRouteApplied,
|
|
33
34
|
isWarmRoutePreloadPending: () => isWarmRoutePreloadPending,
|
|
34
35
|
isWarmStateEnabled: () => isWarmStateEnabled,
|
|
@@ -41,6 +42,7 @@ __export(warmState_exports, {
|
|
|
41
42
|
scheduleWarmStatePersist: () => scheduleWarmStatePersist,
|
|
42
43
|
shouldAttemptWarmRouteRestore: () => shouldAttemptWarmRouteRestore,
|
|
43
44
|
shouldRestoreWarmRoute: () => shouldRestoreWarmRoute,
|
|
45
|
+
trackRestoredLaunch: () => trackRestoredLaunch,
|
|
44
46
|
waitForWarmRoutePreload: () => waitForWarmRoutePreload
|
|
45
47
|
});
|
|
46
48
|
module.exports = __toCommonJS(warmState_exports);
|
|
@@ -49,6 +51,7 @@ var import_extractPathFromURL = require("../fork/extractPathFromURL.cjs");
|
|
|
49
51
|
var import_getPathFromState = require("../fork/getPathFromState.cjs");
|
|
50
52
|
var import_getStateFromPath = require("../fork/getStateFromPath.cjs");
|
|
51
53
|
var import_storage = require("../platform/storage/index.cjs");
|
|
54
|
+
var import_findRouteNode = require("./findRouteNode.cjs");
|
|
52
55
|
var import_useViteRoutes = require("./useViteRoutes.cjs");
|
|
53
56
|
var import_warmStateSerialize = require("./warmStateSerialize.cjs");
|
|
54
57
|
var import_warmStateShared = require("./warmStateShared.cjs");
|
|
@@ -71,6 +74,9 @@ const hydratedSourceKeys = /* @__PURE__ */ new Set();
|
|
|
71
74
|
let loadedFromStorage = false;
|
|
72
75
|
let hydratedEnvelope = null;
|
|
73
76
|
let warmRouteApplied = false;
|
|
77
|
+
let restoredLaunch = false;
|
|
78
|
+
let restoredState;
|
|
79
|
+
let restoredPathname;
|
|
74
80
|
let warmInitialRouteConsumed = false;
|
|
75
81
|
let latestNavState;
|
|
76
82
|
let latestPathname;
|
|
@@ -274,10 +280,34 @@ function routesMatchLinkingConfig(routes, screens) {
|
|
|
274
280
|
}
|
|
275
281
|
return true;
|
|
276
282
|
}
|
|
283
|
+
function getStateFromHref(href, linking) {
|
|
284
|
+
const parsed = (linking?.getStateFromPath ?? import_getStateFromPath.getStateFromPath)(href, linking?.config);
|
|
285
|
+
if (!parsed?.routes?.length) return void 0;
|
|
286
|
+
return parsed;
|
|
287
|
+
}
|
|
288
|
+
function evaluateRouteRestore(state, routeNode, pathname) {
|
|
289
|
+
const nodes = (0, import_findRouteNode.findAllRouteNodesFromState)(state, routeNode);
|
|
290
|
+
if (nodes[0] !== routeNode) nodes.unshift(routeNode);
|
|
291
|
+
let params;
|
|
292
|
+
for (const node of nodes) {
|
|
293
|
+
const restore = node.loadRoute?.()?.restore;
|
|
294
|
+
if (restore === void 0 || restore === true) continue;
|
|
295
|
+
if (restore === false) return false;
|
|
296
|
+
params ??= (0, import_findRouteNode.extractParamsFromState)(state);
|
|
297
|
+
const result = restore({
|
|
298
|
+
pathname,
|
|
299
|
+
params
|
|
300
|
+
});
|
|
301
|
+
if (result === false || result === null) return false;
|
|
302
|
+
if (typeof result === "string") return result;
|
|
303
|
+
}
|
|
304
|
+
return true;
|
|
305
|
+
}
|
|
277
306
|
function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
278
307
|
if (isSSRRuntime()) return void 0;
|
|
279
308
|
if (typeof globalThis !== "undefined" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);
|
|
280
|
-
if (warmInitialRouteConsumed
|
|
309
|
+
if (warmInitialRouteConsumed) return restoredLaunch ? restoredState : void 0;
|
|
310
|
+
if (!shouldRestoreWarmRoute()) return;
|
|
281
311
|
warmInitialRouteConsumed = true;
|
|
282
312
|
const envelope = hydrateWarmInitialLoad();
|
|
283
313
|
if (!envelope?.state || !routeNode) return void 0;
|
|
@@ -293,8 +323,8 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
293
323
|
const aligned = getOrEvaluateAlignRoute(envelope);
|
|
294
324
|
if (aligned === false || aligned === null) return;
|
|
295
325
|
if (typeof aligned === "string") {
|
|
296
|
-
const parsed = (
|
|
297
|
-
if (!parsed
|
|
326
|
+
const parsed = getStateFromHref(aligned, linking);
|
|
327
|
+
if (!parsed) return void 0;
|
|
298
328
|
targetState = parsed;
|
|
299
329
|
envelope.pathname = aligned;
|
|
300
330
|
} else if (typeof aligned === "object" && aligned !== null) {
|
|
@@ -304,6 +334,20 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
304
334
|
if (derivedPath) envelope.pathname = derivedPath;
|
|
305
335
|
}
|
|
306
336
|
}
|
|
337
|
+
let restore;
|
|
338
|
+
try {
|
|
339
|
+
restore = evaluateRouteRestore(targetState, routeNode, envelope.pathname || "/");
|
|
340
|
+
} catch (error) {
|
|
341
|
+
warmInitialRouteConsumed = false;
|
|
342
|
+
throw error;
|
|
343
|
+
}
|
|
344
|
+
if (restore === false) return void 0;
|
|
345
|
+
if (typeof restore === "string") {
|
|
346
|
+
const parsed = getStateFromHref(restore, linking);
|
|
347
|
+
if (!parsed) return void 0;
|
|
348
|
+
targetState = parsed;
|
|
349
|
+
envelope.pathname = restore;
|
|
350
|
+
}
|
|
307
351
|
if (!routesMatchLinkingConfig(targetState.routes, linking?.config?.screens)) {
|
|
308
352
|
if (targetState === envelope.state) {
|
|
309
353
|
safeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);
|
|
@@ -324,7 +368,10 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
324
368
|
return;
|
|
325
369
|
}
|
|
326
370
|
warmRouteApplied = true;
|
|
327
|
-
|
|
371
|
+
restoredLaunch = true;
|
|
372
|
+
restoredPathname = (envelope.pathname || "/").split("?")[0].split("#")[0] || "/";
|
|
373
|
+
restoredState = targetState;
|
|
374
|
+
return restoredState;
|
|
328
375
|
}
|
|
329
376
|
function shouldAttemptWarmRouteRestore(initialLocation) {
|
|
330
377
|
if (!shouldRestoreWarmRoute()) return false;
|
|
@@ -339,6 +386,14 @@ function isWarmWebRestoreEligible(initialLocation) {
|
|
|
339
386
|
function isWarmRouteApplied() {
|
|
340
387
|
return warmRouteApplied;
|
|
341
388
|
}
|
|
389
|
+
function isRestoredLaunch() {
|
|
390
|
+
return restoredLaunch;
|
|
391
|
+
}
|
|
392
|
+
function trackRestoredLaunch(pathname) {
|
|
393
|
+
if (!restoredLaunch || pathname === restoredPathname) return;
|
|
394
|
+
restoredLaunch = false;
|
|
395
|
+
restoredState = void 0;
|
|
396
|
+
}
|
|
342
397
|
function consumeWarmRouteApplied() {
|
|
343
398
|
if (!warmRouteApplied) return false;
|
|
344
399
|
warmRouteApplied = false;
|
|
@@ -385,6 +440,8 @@ function clearWarmState(options) {
|
|
|
385
440
|
hydratedEnvelope = null;
|
|
386
441
|
hydratedSourceKeys.clear();
|
|
387
442
|
warmRouteApplied = false;
|
|
443
|
+
restoredLaunch = false;
|
|
444
|
+
restoredState = void 0;
|
|
388
445
|
warmInitialRouteConsumed = false;
|
|
389
446
|
latestNavState = void 0;
|
|
390
447
|
latestPathname = void 0;
|
|
@@ -432,6 +489,7 @@ async function reconcileNativeColdDeepLink(options) {
|
|
|
432
489
|
options.onComplete?.(null);
|
|
433
490
|
return null;
|
|
434
491
|
}
|
|
492
|
+
trackRestoredLaunch(normalizedTarget);
|
|
435
493
|
options.navigateTo(normalizedTarget);
|
|
436
494
|
options.onComplete?.(normalizedTarget);
|
|
437
495
|
return normalizedTarget;
|
|
@@ -31,6 +31,7 @@ __export(warmState_exports, {
|
|
|
31
31
|
flushWarmState: () => flushWarmState,
|
|
32
32
|
getHydratedWarmState: () => getHydratedWarmState,
|
|
33
33
|
hydrateWarmInitialLoad: () => hydrateWarmInitialLoad,
|
|
34
|
+
isRestoredLaunch: () => isRestoredLaunch,
|
|
34
35
|
isWarmRouteApplied: () => isWarmRouteApplied,
|
|
35
36
|
isWarmRoutePreloadPending: () => isWarmRoutePreloadPending,
|
|
36
37
|
isWarmStateEnabled: () => isWarmStateEnabled,
|
|
@@ -43,6 +44,7 @@ __export(warmState_exports, {
|
|
|
43
44
|
scheduleWarmStatePersist: () => scheduleWarmStatePersist,
|
|
44
45
|
shouldAttemptWarmRouteRestore: () => shouldAttemptWarmRouteRestore,
|
|
45
46
|
shouldRestoreWarmRoute: () => shouldRestoreWarmRoute,
|
|
47
|
+
trackRestoredLaunch: () => trackRestoredLaunch,
|
|
46
48
|
waitForWarmRoutePreload: () => waitForWarmRoutePreload
|
|
47
49
|
});
|
|
48
50
|
module.exports = __toCommonJS(warmState_exports);
|
|
@@ -51,6 +53,7 @@ var import_extractPathFromURL = require("../fork/extractPathFromURL.native.js");
|
|
|
51
53
|
var import_getPathFromState = require("../fork/getPathFromState.native.js");
|
|
52
54
|
var import_getStateFromPath = require("../fork/getStateFromPath.native.js");
|
|
53
55
|
var import_storage = require("../platform/storage/index.native.js");
|
|
56
|
+
var import_findRouteNode = require("./findRouteNode.native.js");
|
|
54
57
|
var import_useViteRoutes = require("./useViteRoutes.native.js");
|
|
55
58
|
var import_warmStateSerialize = require("./warmStateSerialize.native.js");
|
|
56
59
|
var import_warmStateShared = require("./warmStateShared.native.js");
|
|
@@ -75,6 +78,9 @@ var hydratedSourceKeys = /* @__PURE__ */ new Set();
|
|
|
75
78
|
var loadedFromStorage = false;
|
|
76
79
|
var hydratedEnvelope = null;
|
|
77
80
|
var warmRouteApplied = false;
|
|
81
|
+
var restoredLaunch = false;
|
|
82
|
+
var restoredState;
|
|
83
|
+
var restoredPathname;
|
|
78
84
|
var warmInitialRouteConsumed = false;
|
|
79
85
|
var latestNavState;
|
|
80
86
|
var latestPathname;
|
|
@@ -304,11 +310,51 @@ function routesMatchLinkingConfig(routes, screens) {
|
|
|
304
310
|
}
|
|
305
311
|
return true;
|
|
306
312
|
}
|
|
313
|
+
function getStateFromHref(href, linking) {
|
|
314
|
+
var _ref;
|
|
315
|
+
var _parsed_routes;
|
|
316
|
+
var parsed = ((_ref = linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) !== null && _ref !== void 0 ? _ref : import_getStateFromPath.getStateFromPath)(href, linking === null || linking === void 0 ? void 0 : linking.config);
|
|
317
|
+
if (!(parsed === null || parsed === void 0 ? void 0 : (_parsed_routes = parsed.routes) === null || _parsed_routes === void 0 ? void 0 : _parsed_routes.length)) return void 0;
|
|
318
|
+
return parsed;
|
|
319
|
+
}
|
|
320
|
+
function evaluateRouteRestore(state, routeNode, pathname) {
|
|
321
|
+
var nodes = (0, import_findRouteNode.findAllRouteNodesFromState)(state, routeNode);
|
|
322
|
+
if (nodes[0] !== routeNode) nodes.unshift(routeNode);
|
|
323
|
+
var params;
|
|
324
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
325
|
+
try {
|
|
326
|
+
for (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
327
|
+
var node = _step.value;
|
|
328
|
+
var _node_loadRoute, _node_loadRoute1;
|
|
329
|
+
var restore = (_node_loadRoute1 = node.loadRoute) === null || _node_loadRoute1 === void 0 ? void 0 : (_node_loadRoute = _node_loadRoute1.call(node)) === null || _node_loadRoute === void 0 ? void 0 : _node_loadRoute.restore;
|
|
330
|
+
if (restore === void 0 || restore === true) continue;
|
|
331
|
+
if (restore === false) return false;
|
|
332
|
+
params !== null && params !== void 0 || (params = (0, import_findRouteNode.extractParamsFromState)(state));
|
|
333
|
+
var result = restore({
|
|
334
|
+
pathname,
|
|
335
|
+
params
|
|
336
|
+
});
|
|
337
|
+
if (result === false || result === null) return false;
|
|
338
|
+
if (typeof result === "string") return result;
|
|
339
|
+
}
|
|
340
|
+
} catch (err) {
|
|
341
|
+
_didIteratorError = true;
|
|
342
|
+
_iteratorError = err;
|
|
343
|
+
} finally {
|
|
344
|
+
try {
|
|
345
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
346
|
+
} finally {
|
|
347
|
+
if (_didIteratorError) throw _iteratorError;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
307
352
|
function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
308
353
|
var _linking_config;
|
|
309
354
|
if (isSSRRuntime()) return void 0;
|
|
310
355
|
if (typeof globalThis !== "undefined" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);
|
|
311
|
-
if (warmInitialRouteConsumed
|
|
356
|
+
if (warmInitialRouteConsumed) return restoredLaunch ? restoredState : void 0;
|
|
357
|
+
if (!shouldRestoreWarmRoute()) return;
|
|
312
358
|
warmInitialRouteConsumed = true;
|
|
313
359
|
var envelope = hydrateWarmInitialLoad();
|
|
314
360
|
if (!(envelope === null || envelope === void 0 ? void 0 : envelope.state) || !routeNode) return void 0;
|
|
@@ -328,9 +374,8 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
328
374
|
var aligned = getOrEvaluateAlignRoute(envelope);
|
|
329
375
|
if (aligned === false || aligned === null) return;
|
|
330
376
|
if (typeof aligned === "string") {
|
|
331
|
-
var
|
|
332
|
-
|
|
333
|
-
if (!parsed || !parsed.routes || parsed.routes.length === 0) return;
|
|
377
|
+
var parsed = getStateFromHref(aligned, linking);
|
|
378
|
+
if (!parsed) return void 0;
|
|
334
379
|
targetState = parsed;
|
|
335
380
|
envelope.pathname = aligned;
|
|
336
381
|
} else if (typeof aligned === "object" && aligned !== null) {
|
|
@@ -340,6 +385,20 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
340
385
|
if (derivedPath) envelope.pathname = derivedPath;
|
|
341
386
|
}
|
|
342
387
|
}
|
|
388
|
+
var restore;
|
|
389
|
+
try {
|
|
390
|
+
restore = evaluateRouteRestore(targetState, routeNode, envelope.pathname || "/");
|
|
391
|
+
} catch (error) {
|
|
392
|
+
warmInitialRouteConsumed = false;
|
|
393
|
+
throw error;
|
|
394
|
+
}
|
|
395
|
+
if (restore === false) return void 0;
|
|
396
|
+
if (typeof restore === "string") {
|
|
397
|
+
var parsed1 = getStateFromHref(restore, linking);
|
|
398
|
+
if (!parsed1) return void 0;
|
|
399
|
+
targetState = parsed1;
|
|
400
|
+
envelope.pathname = restore;
|
|
401
|
+
}
|
|
343
402
|
if (!routesMatchLinkingConfig(targetState.routes, linking === null || linking === void 0 ? void 0 : (_linking_config = linking.config) === null || _linking_config === void 0 ? void 0 : _linking_config.screens)) {
|
|
344
403
|
if (targetState === envelope.state) {
|
|
345
404
|
safeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);
|
|
@@ -360,7 +419,10 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
360
419
|
return;
|
|
361
420
|
}
|
|
362
421
|
warmRouteApplied = true;
|
|
363
|
-
|
|
422
|
+
restoredLaunch = true;
|
|
423
|
+
restoredPathname = (envelope.pathname || "/").split("?")[0].split("#")[0] || "/";
|
|
424
|
+
restoredState = targetState;
|
|
425
|
+
return restoredState;
|
|
364
426
|
}
|
|
365
427
|
function shouldAttemptWarmRouteRestore(initialLocation) {
|
|
366
428
|
if (!shouldRestoreWarmRoute()) return false;
|
|
@@ -376,6 +438,14 @@ function isWarmWebRestoreEligible(initialLocation) {
|
|
|
376
438
|
function isWarmRouteApplied() {
|
|
377
439
|
return warmRouteApplied;
|
|
378
440
|
}
|
|
441
|
+
function isRestoredLaunch() {
|
|
442
|
+
return restoredLaunch;
|
|
443
|
+
}
|
|
444
|
+
function trackRestoredLaunch(pathname) {
|
|
445
|
+
if (!restoredLaunch || pathname === restoredPathname) return;
|
|
446
|
+
restoredLaunch = false;
|
|
447
|
+
restoredState = void 0;
|
|
448
|
+
}
|
|
379
449
|
function consumeWarmRouteApplied() {
|
|
380
450
|
if (!warmRouteApplied) return false;
|
|
381
451
|
warmRouteApplied = false;
|
|
@@ -437,6 +507,8 @@ function clearWarmState(options) {
|
|
|
437
507
|
hydratedEnvelope = null;
|
|
438
508
|
hydratedSourceKeys.clear();
|
|
439
509
|
warmRouteApplied = false;
|
|
510
|
+
restoredLaunch = false;
|
|
511
|
+
restoredState = void 0;
|
|
440
512
|
warmInitialRouteConsumed = false;
|
|
441
513
|
latestNavState = void 0;
|
|
442
514
|
latestPathname = void 0;
|
|
@@ -490,6 +562,7 @@ async function reconcileNativeColdDeepLink(options) {
|
|
|
490
562
|
(_options_onComplete4 = options.onComplete) === null || _options_onComplete4 === void 0 || _options_onComplete4.call(options, null);
|
|
491
563
|
return null;
|
|
492
564
|
}
|
|
565
|
+
trackRestoredLaunch(normalizedTarget);
|
|
493
566
|
options.navigateTo(normalizedTarget);
|
|
494
567
|
(_options_onComplete = options.onComplete) === null || _options_onComplete === void 0 || _options_onComplete.call(options, normalizedTarget);
|
|
495
568
|
return normalizedTarget;
|
|
@@ -31,6 +31,7 @@ __export(warmState_exports, {
|
|
|
31
31
|
flushWarmState: () => flushWarmState,
|
|
32
32
|
getHydratedWarmState: () => getHydratedWarmState,
|
|
33
33
|
hydrateWarmInitialLoad: () => hydrateWarmInitialLoad,
|
|
34
|
+
isRestoredLaunch: () => isRestoredLaunch,
|
|
34
35
|
isWarmRouteApplied: () => isWarmRouteApplied,
|
|
35
36
|
isWarmRoutePreloadPending: () => isWarmRoutePreloadPending,
|
|
36
37
|
isWarmStateEnabled: () => isWarmStateEnabled,
|
|
@@ -43,6 +44,7 @@ __export(warmState_exports, {
|
|
|
43
44
|
scheduleWarmStatePersist: () => scheduleWarmStatePersist,
|
|
44
45
|
shouldAttemptWarmRouteRestore: () => shouldAttemptWarmRouteRestore,
|
|
45
46
|
shouldRestoreWarmRoute: () => shouldRestoreWarmRoute,
|
|
47
|
+
trackRestoredLaunch: () => trackRestoredLaunch,
|
|
46
48
|
waitForWarmRoutePreload: () => waitForWarmRoutePreload
|
|
47
49
|
});
|
|
48
50
|
module.exports = __toCommonJS(warmState_exports);
|
|
@@ -51,6 +53,7 @@ var import_extractPathFromURL = require("../fork/extractPathFromURL.native.js");
|
|
|
51
53
|
var import_getPathFromState = require("../fork/getPathFromState.native.js");
|
|
52
54
|
var import_getStateFromPath = require("../fork/getStateFromPath.native.js");
|
|
53
55
|
var import_storage = require("../platform/storage/index.native.js");
|
|
56
|
+
var import_findRouteNode = require("./findRouteNode.native.js");
|
|
54
57
|
var import_useViteRoutes = require("./useViteRoutes.native.js");
|
|
55
58
|
var import_warmStateSerialize = require("./warmStateSerialize.native.js");
|
|
56
59
|
var import_warmStateShared = require("./warmStateShared.native.js");
|
|
@@ -75,6 +78,9 @@ var hydratedSourceKeys = /* @__PURE__ */ new Set();
|
|
|
75
78
|
var loadedFromStorage = false;
|
|
76
79
|
var hydratedEnvelope = null;
|
|
77
80
|
var warmRouteApplied = false;
|
|
81
|
+
var restoredLaunch = false;
|
|
82
|
+
var restoredState;
|
|
83
|
+
var restoredPathname;
|
|
78
84
|
var warmInitialRouteConsumed = false;
|
|
79
85
|
var latestNavState;
|
|
80
86
|
var latestPathname;
|
|
@@ -304,11 +310,51 @@ function routesMatchLinkingConfig(routes, screens) {
|
|
|
304
310
|
}
|
|
305
311
|
return true;
|
|
306
312
|
}
|
|
313
|
+
function getStateFromHref(href, linking) {
|
|
314
|
+
var _ref;
|
|
315
|
+
var _parsed_routes;
|
|
316
|
+
var parsed = ((_ref = linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) !== null && _ref !== void 0 ? _ref : import_getStateFromPath.getStateFromPath)(href, linking === null || linking === void 0 ? void 0 : linking.config);
|
|
317
|
+
if (!(parsed === null || parsed === void 0 ? void 0 : (_parsed_routes = parsed.routes) === null || _parsed_routes === void 0 ? void 0 : _parsed_routes.length)) return void 0;
|
|
318
|
+
return parsed;
|
|
319
|
+
}
|
|
320
|
+
function evaluateRouteRestore(state, routeNode, pathname) {
|
|
321
|
+
var nodes = (0, import_findRouteNode.findAllRouteNodesFromState)(state, routeNode);
|
|
322
|
+
if (nodes[0] !== routeNode) nodes.unshift(routeNode);
|
|
323
|
+
var params;
|
|
324
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
325
|
+
try {
|
|
326
|
+
for (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
327
|
+
var node = _step.value;
|
|
328
|
+
var _node_loadRoute, _node_loadRoute1;
|
|
329
|
+
var restore = (_node_loadRoute1 = node.loadRoute) === null || _node_loadRoute1 === void 0 ? void 0 : (_node_loadRoute = _node_loadRoute1.call(node)) === null || _node_loadRoute === void 0 ? void 0 : _node_loadRoute.restore;
|
|
330
|
+
if (restore === void 0 || restore === true) continue;
|
|
331
|
+
if (restore === false) return false;
|
|
332
|
+
params !== null && params !== void 0 || (params = (0, import_findRouteNode.extractParamsFromState)(state));
|
|
333
|
+
var result = restore({
|
|
334
|
+
pathname,
|
|
335
|
+
params
|
|
336
|
+
});
|
|
337
|
+
if (result === false || result === null) return false;
|
|
338
|
+
if (typeof result === "string") return result;
|
|
339
|
+
}
|
|
340
|
+
} catch (err) {
|
|
341
|
+
_didIteratorError = true;
|
|
342
|
+
_iteratorError = err;
|
|
343
|
+
} finally {
|
|
344
|
+
try {
|
|
345
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();
|
|
346
|
+
} finally {
|
|
347
|
+
if (_didIteratorError) throw _iteratorError;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
return true;
|
|
351
|
+
}
|
|
307
352
|
function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
308
353
|
var _linking_config;
|
|
309
354
|
if (isSSRRuntime()) return void 0;
|
|
310
355
|
if (typeof globalThis !== "undefined" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);
|
|
311
|
-
if (warmInitialRouteConsumed
|
|
356
|
+
if (warmInitialRouteConsumed) return restoredLaunch ? restoredState : void 0;
|
|
357
|
+
if (!shouldRestoreWarmRoute()) return;
|
|
312
358
|
warmInitialRouteConsumed = true;
|
|
313
359
|
var envelope = hydrateWarmInitialLoad();
|
|
314
360
|
if (!(envelope === null || envelope === void 0 ? void 0 : envelope.state) || !routeNode) return void 0;
|
|
@@ -328,9 +374,8 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
328
374
|
var aligned = getOrEvaluateAlignRoute(envelope);
|
|
329
375
|
if (aligned === false || aligned === null) return;
|
|
330
376
|
if (typeof aligned === "string") {
|
|
331
|
-
var
|
|
332
|
-
|
|
333
|
-
if (!parsed || !parsed.routes || parsed.routes.length === 0) return;
|
|
377
|
+
var parsed = getStateFromHref(aligned, linking);
|
|
378
|
+
if (!parsed) return void 0;
|
|
334
379
|
targetState = parsed;
|
|
335
380
|
envelope.pathname = aligned;
|
|
336
381
|
} else if (typeof aligned === "object" && aligned !== null) {
|
|
@@ -340,6 +385,20 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
340
385
|
if (derivedPath) envelope.pathname = derivedPath;
|
|
341
386
|
}
|
|
342
387
|
}
|
|
388
|
+
var restore;
|
|
389
|
+
try {
|
|
390
|
+
restore = evaluateRouteRestore(targetState, routeNode, envelope.pathname || "/");
|
|
391
|
+
} catch (error) {
|
|
392
|
+
warmInitialRouteConsumed = false;
|
|
393
|
+
throw error;
|
|
394
|
+
}
|
|
395
|
+
if (restore === false) return void 0;
|
|
396
|
+
if (typeof restore === "string") {
|
|
397
|
+
var parsed1 = getStateFromHref(restore, linking);
|
|
398
|
+
if (!parsed1) return void 0;
|
|
399
|
+
targetState = parsed1;
|
|
400
|
+
envelope.pathname = restore;
|
|
401
|
+
}
|
|
343
402
|
if (!routesMatchLinkingConfig(targetState.routes, linking === null || linking === void 0 ? void 0 : (_linking_config = linking.config) === null || _linking_config === void 0 ? void 0 : _linking_config.screens)) {
|
|
344
403
|
if (targetState === envelope.state) {
|
|
345
404
|
safeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);
|
|
@@ -360,7 +419,10 @@ function consumeWarmInitialNavigationState(routeNode, linking) {
|
|
|
360
419
|
return;
|
|
361
420
|
}
|
|
362
421
|
warmRouteApplied = true;
|
|
363
|
-
|
|
422
|
+
restoredLaunch = true;
|
|
423
|
+
restoredPathname = (envelope.pathname || "/").split("?")[0].split("#")[0] || "/";
|
|
424
|
+
restoredState = targetState;
|
|
425
|
+
return restoredState;
|
|
364
426
|
}
|
|
365
427
|
function shouldAttemptWarmRouteRestore(initialLocation) {
|
|
366
428
|
if (!shouldRestoreWarmRoute()) return false;
|
|
@@ -376,6 +438,14 @@ function isWarmWebRestoreEligible(initialLocation) {
|
|
|
376
438
|
function isWarmRouteApplied() {
|
|
377
439
|
return warmRouteApplied;
|
|
378
440
|
}
|
|
441
|
+
function isRestoredLaunch() {
|
|
442
|
+
return restoredLaunch;
|
|
443
|
+
}
|
|
444
|
+
function trackRestoredLaunch(pathname) {
|
|
445
|
+
if (!restoredLaunch || pathname === restoredPathname) return;
|
|
446
|
+
restoredLaunch = false;
|
|
447
|
+
restoredState = void 0;
|
|
448
|
+
}
|
|
379
449
|
function consumeWarmRouteApplied() {
|
|
380
450
|
if (!warmRouteApplied) return false;
|
|
381
451
|
warmRouteApplied = false;
|
|
@@ -437,6 +507,8 @@ function clearWarmState(options) {
|
|
|
437
507
|
hydratedEnvelope = null;
|
|
438
508
|
hydratedSourceKeys.clear();
|
|
439
509
|
warmRouteApplied = false;
|
|
510
|
+
restoredLaunch = false;
|
|
511
|
+
restoredState = void 0;
|
|
440
512
|
warmInitialRouteConsumed = false;
|
|
441
513
|
latestNavState = void 0;
|
|
442
514
|
latestPathname = void 0;
|
|
@@ -490,6 +562,7 @@ async function reconcileNativeColdDeepLink(options) {
|
|
|
490
562
|
(_options_onComplete4 = options.onComplete) === null || _options_onComplete4 === void 0 || _options_onComplete4.call(options, null);
|
|
491
563
|
return null;
|
|
492
564
|
}
|
|
565
|
+
trackRestoredLaunch(normalizedTarget);
|
|
493
566
|
options.navigateTo(normalizedTarget);
|
|
494
567
|
(_options_onComplete = options.onComplete) === null || _options_onComplete === void 0 || _options_onComplete.call(options, normalizedTarget);
|
|
495
568
|
return normalizedTarget;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"warmState.native.js","names":[],"sources":["cjs/router/warmState.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar warmState_exports = {};\n__export(warmState_exports, {\n\tclearWarmState: () => clearWarmState,\n\tconfigureWarmState: () => configureWarmState,\n\tconfigureWarmStateFromFlags: () => configureWarmStateFromFlags,\n\tconsumeWarmInitialNavigationState: () => consumeWarmInitialNavigationState,\n\tconsumeWarmRouteApplied: () => consumeWarmRouteApplied,\n\tflushWarmState: () => flushWarmState,\n\tgetHydratedWarmState: () => getHydratedWarmState,\n\thydrateWarmInitialLoad: () => hydrateWarmInitialLoad,\n\tisWarmRouteApplied: () => isWarmRouteApplied,\n\tisWarmRoutePreloadPending: () => isWarmRoutePreloadPending,\n\tisWarmStateEnabled: () => isWarmStateEnabled,\n\tisWarmWebRestoreEligible: () => isWarmWebRestoreEligible,\n\tmatchRoutePattern: () => import_warmStateShared2.matchRoutePattern,\n\tnormalizeHref: () => normalizeHref,\n\tnormalizeRoutePattern: () => import_warmStateShared2.normalizeRoutePattern,\n\treconcileNativeColdDeepLink: () => reconcileNativeColdDeepLink,\n\tregisterWarmStateSource: () => registerWarmStateSource,\n\tscheduleWarmStatePersist: () => scheduleWarmStatePersist,\n\tshouldAttemptWarmRouteRestore: () => shouldAttemptWarmRouteRestore,\n\tshouldRestoreWarmRoute: () => shouldRestoreWarmRoute,\n\twaitForWarmRoutePreload: () => waitForWarmRoutePreload\n});\nmodule.exports = __toCommonJS(warmState_exports);\nvar import_constants = require(\"../constants\");\nvar import_extractPathFromURL = require(\"../fork/extractPathFromURL\");\nvar import_getPathFromState = require(\"../fork/getPathFromState\");\nvar import_getStateFromPath = require(\"../fork/getStateFromPath\");\nvar import_storage = require(\"../platform/storage\");\nvar import_useViteRoutes = require(\"./useViteRoutes\");\nvar import_warmStateSerialize = require(\"./warmStateSerialize\");\nvar import_warmStateShared = require(\"./warmStateShared\");\nvar import_warmStateShared2 = require(\"./warmStateShared\");\nvar defaultConfig = {\n\tenabled: false,\n\tschemaVersion: 1,\n\tmaxAgeMs: import_warmStateShared.DEFAULT_WARM_STATE_MAX_AGE_MS,\n\trestoreRoute: true,\n\trestoreWebRoute: false,\n\tpreloadRoutes: true,\n\tincludeRoutes: void 0,\n\texcludeRoutes: void 0,\n\talignRoute: void 0,\n\tnow: function now() {\n\t\treturn Date.now();\n\t}\n};\nvar config = { ...defaultConfig };\nvar registeredSources = /* @__PURE__ */ new Map();\nvar hydratedSourceKeys = /* @__PURE__ */ new Set();\nvar loadedFromStorage = false;\nvar hydratedEnvelope = null;\nvar warmRouteApplied = false;\nvar warmInitialRouteConsumed = false;\nvar latestNavState;\nvar latestPathname;\nvar pendingInput = null;\nvar serializer = null;\nfunction isNativeRuntime() {\n\treturn true;\n}\nfunction isWebClientRuntime() {\n\treturn false;\n}\nfunction isSSRRuntime() {\n\treturn false;\n}\nfunction hasDefaultStorage() {\n\tif (isSSRRuntime()) return false;\n\tif (isNativeRuntime()) return true;\n\treturn typeof localStorage !== \"undefined\";\n}\nfunction getStorage() {\n\tif (config.storage) return config.storage;\n\tif (!hasDefaultStorage()) return null;\n\treturn import_storage.Storage;\n}\nfunction safeReadStorage(key) {\n\tvar storage = getStorage();\n\tif (!storage) return null;\n\ttry {\n\t\treturn storage.getItem(key);\n\t} catch (unused) {\n\t\treturn null;\n\t}\n}\nfunction safeWriteStorage(key, value) {\n\tvar storage = getStorage();\n\tif (!storage) return false;\n\ttry {\n\t\tstorage.setItem(key, value);\n\t\treturn true;\n\t} catch (unused) {\n\t\treturn false;\n\t}\n}\nfunction safeRemoveStorage(key) {\n\tvar storage = getStorage();\n\tif (!storage) return;\n\ttry {\n\t\tstorage.removeItem(key);\n\t} catch (unused) {}\n}\nfunction normalizeWarmFlag(flag) {\n\tvar _flag_enabled;\n\tif (!flag) return null;\n\tif (flag === true) return { enabled: true };\n\treturn {\n\t\tenabled: (_flag_enabled = flag.enabled) !== null && _flag_enabled !== void 0 ? _flag_enabled : true,\n\t\t...flag\n\t};\n}\nfunction configureWarmState(options) {\n\tif (isSSRRuntime()) return;\n\tconfig = {\n\t\t...config,\n\t\t...options.enabled !== void 0 ? { enabled: options.enabled } : {},\n\t\t...options.schemaVersion !== void 0 ? { schemaVersion: options.schemaVersion } : {},\n\t\t...options.maxAgeMs !== void 0 ? { maxAgeMs: options.maxAgeMs } : {},\n\t\t...options.restoreRoute !== void 0 ? { restoreRoute: options.restoreRoute } : {},\n\t\t...options.restoreWebRoute !== void 0 ? { restoreWebRoute: options.restoreWebRoute } : {},\n\t\t...options.preloadRoutes !== void 0 ? { preloadRoutes: options.preloadRoutes } : {},\n\t\t...options.includeRoutes !== void 0 ? { includeRoutes: options.includeRoutes } : {},\n\t\t...options.excludeRoutes !== void 0 ? { excludeRoutes: options.excludeRoutes } : {},\n\t\t...options.alignRoute !== void 0 ? { alignRoute: options.alignRoute } : {},\n\t\t...options.storage !== void 0 ? { storage: options.storage } : {},\n\t\t...options.now !== void 0 ? { now: options.now } : {}\n\t};\n}\nfunction configureWarmStateFromFlags(flags) {\n\tif (isSSRRuntime() || !(flags === null || flags === void 0 ? void 0 : flags.warmStart)) return;\n\tvar normalized = normalizeWarmFlag(flags.warmStart);\n\tif (normalized) configureWarmState(normalized);\n}\nfunction isWarmStateEnabled() {\n\treturn !isSSRRuntime() && config.enabled;\n}\nfunction shouldRestoreWarmRoute() {\n\tif (!isWarmStateEnabled()) return false;\n\tif (isNativeRuntime()) return config.restoreRoute;\n\treturn config.restoreWebRoute;\n}\nfunction hydrateSourceKey(key, source, envelope) {\n\tif (hydratedSourceKeys.has(key)) return;\n\tif (!(key in envelope.sources)) return;\n\tvar payload = envelope.sources[key];\n\tif (source.validate && !source.validate(payload)) return;\n\thydratedSourceKeys.add(key);\n\tsource.hydrate(payload);\n}\nfunction registerWarmStateSource(key, source) {\n\tregisteredSources.set(key, source);\n\tif (!isSSRRuntime() && config.enabled && hydratedEnvelope) hydrateSourceKey(key, source, hydratedEnvelope);\n\treturn function() {\n\t\tregisteredSources.delete(key);\n\t};\n}\nfunction ensureLoadedEnvelope() {\n\tif (!isWarmStateEnabled()) return null;\n\tif (loadedFromStorage) return hydratedEnvelope;\n\tloadedFromStorage = true;\n\tvar raw = safeReadStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\tif (!raw) return null;\n\tvar parsed = (0, import_warmStateShared.parseWarmEnvelope)(raw, {\n\t\tschemaVersion: config.schemaVersion,\n\t\tmaxAgeMs: config.maxAgeMs,\n\t\tnow: config.now()\n\t});\n\tif (!parsed) {\n\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\thydratedEnvelope = null;\n\t\treturn null;\n\t}\n\thydratedEnvelope = parsed;\n\treturn hydratedEnvelope;\n}\nfunction getHydratedWarmState() {\n\tif (!isWarmStateEnabled()) return null;\n\treturn ensureLoadedEnvelope();\n}\nfunction getPathnameFromSnapshot(snapshot) {\n\tvar _snapshot_routes_, _snapshot_index;\n\tvar activeRoute = (_snapshot_routes_ = snapshot.routes[(_snapshot_index = snapshot.index) !== null && _snapshot_index !== void 0 ? _snapshot_index : 0]) !== null && _snapshot_routes_ !== void 0 ? _snapshot_routes_ : snapshot.routes[0];\n\tif (!activeRoute) return void 0;\n\tif (typeof activeRoute.path === \"string\" && activeRoute.path) return activeRoute.path.startsWith(\"/\") ? activeRoute.path : `/${activeRoute.path}`;\n\tif (typeof activeRoute.name === \"string\" && activeRoute.name) return activeRoute.name === \"index\" ? \"/\" : `/${activeRoute.name}`;\n}\nvar cachedAlignedRoute = null;\nfunction getOrEvaluateAlignRoute(envelope) {\n\tvar _envelope_pathname;\n\tif (!config.alignRoute || !envelope.state) return;\n\tif (cachedAlignedRoute && cachedAlignedRoute.evaluated) return cachedAlignedRoute.result;\n\tvar result = config.alignRoute({\n\t\tpathname: (_envelope_pathname = envelope.pathname) !== null && _envelope_pathname !== void 0 ? _envelope_pathname : \"/\",\n\t\tstate: envelope.state\n\t});\n\tcachedAlignedRoute = {\n\t\tevaluated: true,\n\t\tresult\n\t};\n\treturn result;\n}\nvar activeWarmRoutePreload = null;\nvar warmRoutePreloadCompleted = false;\nfunction isWarmRoutePreloadPending() {\n\treturn activeWarmRoutePreload !== null && !warmRoutePreloadCompleted;\n}\nasync function waitForWarmRoutePreload() {\n\tvar timeoutMs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 200;\n\tif (!activeWarmRoutePreload || warmRoutePreloadCompleted) return;\n\ttry {\n\t\tif (timeoutMs <= 0) {\n\t\t\tawait activeWarmRoutePreload;\n\t\t\treturn;\n\t\t}\n\t\tawait Promise.race([activeWarmRoutePreload, new Promise(function(resolve) {\n\t\t\treturn setTimeout(resolve, timeoutMs);\n\t\t})]);\n\t} catch (unused) {}\n}\nfunction hydrateWarmInitialLoad(options) {\n\tif (isSSRRuntime()) return null;\n\tif (options === null || options === void 0 ? void 0 : options.flags) configureWarmStateFromFlags(options.flags);\n\tif (typeof globalThis !== \"undefined\" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);\n\tif (!config.enabled) return null;\n\tvar envelope = ensureLoadedEnvelope();\n\tif (!envelope) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = registeredSources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [key, source] = _step.value;\n\t\t\thydrateSourceKey(key, source, envelope);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tif (config.preloadRoutes && envelope.pathname && (options === null || options === void 0 ? void 0 : options.routes)) {\n\t\tvar _config_excludeRoutes;\n\t\tvar targetPathname = envelope.pathname;\n\t\tvar cleanPath = targetPathname.split(\"?\")[0].split(\"#\")[0] || \"/\";\n\t\tif ((_config_excludeRoutes = config.excludeRoutes) === null || _config_excludeRoutes === void 0 ? void 0 : _config_excludeRoutes.some(function(p) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(p, cleanPath);\n\t\t})) targetPathname = void 0;\n\t\telse if (config.includeRoutes && config.includeRoutes.length > 0 && !config.includeRoutes.some(function(p) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(p, cleanPath);\n\t\t})) targetPathname = void 0;\n\t\telse if (config.alignRoute && envelope.state) {\n\t\t\tvar aligned = getOrEvaluateAlignRoute(envelope);\n\t\t\tif (aligned === false || aligned === null) targetPathname = void 0;\n\t\t\telse if (typeof aligned === \"string\") targetPathname = aligned;\n\t\t\telse if (typeof aligned === \"object\" && aligned !== null) targetPathname = getPathnameFromSnapshot(aligned);\n\t\t}\n\t\tif (targetPathname) {\n\t\t\tglobalThis[\"__importMetaGlobbed\"] = options.routes;\n\t\t\twarmRoutePreloadCompleted = false;\n\t\t\tactiveWarmRoutePreload = (0, import_useViteRoutes.preloadRouteModules)(targetPathname).catch(function() {}).finally(function() {\n\t\t\t\twarmRoutePreloadCompleted = true;\n\t\t\t});\n\t\t}\n\t}\n\treturn envelope;\n}\nfunction routesMatchLinkingConfig(routes, screens) {\n\tif (!screens || Object.keys(screens).length === 0) return true;\n\tfor (var i = 0; i < routes.length; i++) {\n\t\tvar route = routes[i];\n\t\tvar entry = screens[route.name];\n\t\tif (entry === void 0 || entry === null) return false;\n\t\tif (route.state) {\n\t\t\tif (typeof entry !== \"object\" || !entry.screens) return false;\n\t\t\tif (!routesMatchLinkingConfig(route.state.routes, entry.screens)) return false;\n\t\t}\n\t}\n\treturn true;\n}\nfunction consumeWarmInitialNavigationState(routeNode, linking) {\n\tvar _linking_config;\n\tif (isSSRRuntime()) return void 0;\n\tif (typeof globalThis !== \"undefined\" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);\n\tif (warmInitialRouteConsumed || !shouldRestoreWarmRoute()) return;\n\twarmInitialRouteConsumed = true;\n\tvar envelope = hydrateWarmInitialLoad();\n\tif (!(envelope === null || envelope === void 0 ? void 0 : envelope.state) || !routeNode) return void 0;\n\tvar savedPathname = (envelope.pathname || \"/\").split(\"?\")[0].split(\"#\")[0] || \"/\";\n\tif (config.excludeRoutes && config.excludeRoutes.length > 0) {\n\t\tif (config.excludeRoutes.some(function(pattern) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(pattern, savedPathname);\n\t\t})) return;\n\t}\n\tif (config.includeRoutes && config.includeRoutes.length > 0) {\n\t\tif (!config.includeRoutes.some(function(pattern) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(pattern, savedPathname);\n\t\t})) return;\n\t}\n\tvar targetState = envelope.state;\n\tif (config.alignRoute) {\n\t\tvar aligned = getOrEvaluateAlignRoute(envelope);\n\t\tif (aligned === false || aligned === null) return;\n\t\tif (typeof aligned === \"string\") {\n\t\t\tvar _ref;\n\t\t\tvar parsed = ((_ref = linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) !== null && _ref !== void 0 ? _ref : import_getStateFromPath.getStateFromPath)(aligned, linking === null || linking === void 0 ? void 0 : linking.config);\n\t\t\tif (!parsed || !parsed.routes || parsed.routes.length === 0) return;\n\t\t\ttargetState = parsed;\n\t\t\tenvelope.pathname = aligned;\n\t\t} else if (typeof aligned === \"object\" && aligned !== null) {\n\t\t\tif (!aligned.routes || !Array.isArray(aligned.routes) || aligned.routes.length === 0) return;\n\t\t\ttargetState = aligned;\n\t\t\tvar derivedPath = getPathnameFromSnapshot(aligned);\n\t\t\tif (derivedPath) envelope.pathname = derivedPath;\n\t\t}\n\t}\n\tif (!routesMatchLinkingConfig(targetState.routes, linking === null || linking === void 0 ? void 0 : (_linking_config = linking.config) === null || _linking_config === void 0 ? void 0 : _linking_config.screens)) {\n\t\tif (targetState === envelope.state) {\n\t\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\t\thydratedEnvelope = null;\n\t\t}\n\t\treturn;\n\t}\n\ttry {\n\t\t(0, import_getPathFromState.getPathDataFromState)(targetState, {\n\t\t\tscreens: [],\n\t\t\t...linking === null || linking === void 0 ? void 0 : linking.config\n\t\t});\n\t} catch (unused) {\n\t\tif (targetState === envelope.state) {\n\t\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\t\thydratedEnvelope = null;\n\t\t}\n\t\treturn;\n\t}\n\twarmRouteApplied = true;\n\treturn targetState;\n}\nfunction shouldAttemptWarmRouteRestore(initialLocation) {\n\tif (!shouldRestoreWarmRoute()) return false;\n\treturn isNativeRuntime() || isWarmWebRestoreEligible(initialLocation);\n}\nfunction isWarmWebRestoreEligible(initialLocation) {\n\tvar _globalThis_SERVER_CONTEXT_KEY;\n\tif (!isWebClientRuntime() || !config.restoreWebRoute || !initialLocation) return false;\n\tvar serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n\tif (serverMode !== \"spa\" && serverMode !== \"spa-shell\") return false;\n\treturn initialLocation.pathname === \"/\" && !initialLocation.search && !initialLocation.hash;\n}\nfunction isWarmRouteApplied() {\n\treturn warmRouteApplied;\n}\nfunction consumeWarmRouteApplied() {\n\tif (!warmRouteApplied) return false;\n\twarmRouteApplied = false;\n\treturn true;\n}\nfunction ensureSerializer() {\n\tif (serializer) return serializer;\n\tserializer = (0, import_warmStateSerialize.createWarmSerializer)(function(state) {\n\t\tif (state.phase !== \"ready\") return;\n\t\tif (!pendingInput) return;\n\t\tif (safeWriteStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY, state.result.value.json)) pendingInput = null;\n\t});\n\treturn serializer;\n}\nfunction collectSources() {\n\tvar sources = {};\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = registeredSources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [key, source] = _step.value;\n\t\t\tsources[key] = source.getSnapshot();\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn sources;\n}\nfunction scheduleWarmStatePersist(navState, pathname) {\n\tif (!isWarmStateEnabled()) return;\n\tif (navState !== void 0) latestNavState = navState;\n\tif (pathname !== void 0) latestPathname = pathname;\n\tvar input = {\n\t\tschemaVersion: config.schemaVersion,\n\t\tupdatedAt: config.now(),\n\t\tpathname: latestPathname,\n\t\tstate: latestNavState,\n\t\tsources: collectSources()\n\t};\n\tpendingInput = input;\n\tensureSerializer().update(input);\n}\nfunction flushWarmState() {\n\tif (!isWarmStateEnabled() || !pendingInput) return false;\n\tvar input = pendingInput;\n\tpendingInput = null;\n\tvar { json } = (0, import_warmStateShared.serializeWarmInputSync)(input);\n\treturn safeWriteStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY, json);\n}\nfunction clearWarmState(options) {\n\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\tloadedFromStorage = false;\n\thydratedEnvelope = null;\n\thydratedSourceKeys.clear();\n\twarmRouteApplied = false;\n\twarmInitialRouteConsumed = false;\n\tlatestNavState = void 0;\n\tlatestPathname = void 0;\n\tpendingInput = null;\n\tserializer === null || serializer === void 0 || serializer.dispose();\n\tserializer = null;\n\tactiveWarmRoutePreload = null;\n\twarmRoutePreloadCompleted = false;\n\tcachedAlignedRoute = null;\n\tdelete globalThis[\"__importMetaGlobbed\"];\n\tif (!(options === null || options === void 0 ? void 0 : options.keepConfig)) {\n\t\tconfig = { ...defaultConfig };\n\t\tregisteredSources.clear();\n\t}\n}\nfunction normalizeHref(href) {\n\tvar [withoutHash, ...hashParts] = (href.startsWith(\"/\") ? href : `/${href}`).split(\"#\");\n\tvar hash = hashParts.length > 0 ? `#${hashParts.join(\"#\")}` : \"\";\n\tvar [pathname, ...queryParts] = withoutHash.split(\"?\");\n\tvar query = queryParts.length > 0 ? `?${queryParts.join(\"?\")}` : \"\";\n\treturn `${pathname.length > 1 && pathname.endsWith(\"/\") ? pathname.slice(0, -1) : pathname}${query}${hash}`;\n}\nasync function reconcileNativeColdDeepLink(options) {\n\tvar _options_prefixes, _options_currentHref;\n\tvar _options_onComplete;\n\tif (isSSRRuntime()) return null;\n\tvar initialUrl = null;\n\ttry {\n\t\tinitialUrl = await options.getInitialURL();\n\t} catch (unused) {\n\t\tvar _options_onComplete1;\n\t\t(_options_onComplete1 = options.onComplete) === null || _options_onComplete1 === void 0 || _options_onComplete1.call(options, null);\n\t\treturn null;\n\t}\n\tif (!initialUrl) {\n\t\tvar _options_onComplete2;\n\t\t(_options_onComplete2 = options.onComplete) === null || _options_onComplete2 === void 0 || _options_onComplete2.call(options, null);\n\t\treturn null;\n\t}\n\tvar extracted = (0, import_extractPathFromURL.extractPathFromURL)((_options_prefixes = options.prefixes) !== null && _options_prefixes !== void 0 ? _options_prefixes : [], initialUrl);\n\tif (!extracted) {\n\t\tvar _options_onComplete3;\n\t\t(_options_onComplete3 = options.onComplete) === null || _options_onComplete3 === void 0 || _options_onComplete3.call(options, null);\n\t\treturn null;\n\t}\n\tvar normalizedTarget = normalizeHref(extracted);\n\tvar current = (_options_currentHref = options.currentHref) !== null && _options_currentHref !== void 0 ? _options_currentHref : options.currentPathname;\n\tvar normalizedCurrent = current ? normalizeHref(current) : void 0;\n\tif (normalizedCurrent && normalizedTarget === normalizedCurrent) {\n\t\tvar _options_onComplete4;\n\t\t(_options_onComplete4 = options.onComplete) === null || _options_onComplete4 === void 0 || _options_onComplete4.call(options, null);\n\t\treturn null;\n\t}\n\toptions.navigateTo(normalizedTarget);\n\t(_options_onComplete = options.onComplete) === null || _options_onComplete === void 0 || _options_onComplete.call(options, normalizedTarget);\n\treturn normalizedTarget;\n}\n//# sourceMappingURL=warmState.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC3B,sBAAs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BAAqB,mBAAmB;EAChE,IAAI;EACJ,CAAC,uBAAuB,QAAQ,gBAAgB,QAAQ,yBAAyB,KAAK,KAAK,qBAAqB,KAAK,SAAS,IAAI;EAClI,OAAO;CACR;CACA,QAAQ,WAAW,gBAAgB;CACnC,CAAC,sBAAsB,QAAQ,gBAAgB,QAAQ,wBAAwB,KAAK,KAAK,oBAAoB,KAAK,SAAS,gBAAgB;CAC3I,OAAO;AACR"}
|
|
1
|
+
{"version":3,"file":"warmState.native.js","names":[],"sources":["cjs/router/warmState.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n\tfor (var name in all) __defProp(target, name, {\n\t\tget: all[name],\n\t\tenumerable: true\n\t});\n};\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") {\n\t\tfor (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: () => from[key],\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar warmState_exports = {};\n__export(warmState_exports, {\n\tclearWarmState: () => clearWarmState,\n\tconfigureWarmState: () => configureWarmState,\n\tconfigureWarmStateFromFlags: () => configureWarmStateFromFlags,\n\tconsumeWarmInitialNavigationState: () => consumeWarmInitialNavigationState,\n\tconsumeWarmRouteApplied: () => consumeWarmRouteApplied,\n\tflushWarmState: () => flushWarmState,\n\tgetHydratedWarmState: () => getHydratedWarmState,\n\thydrateWarmInitialLoad: () => hydrateWarmInitialLoad,\n\tisRestoredLaunch: () => isRestoredLaunch,\n\tisWarmRouteApplied: () => isWarmRouteApplied,\n\tisWarmRoutePreloadPending: () => isWarmRoutePreloadPending,\n\tisWarmStateEnabled: () => isWarmStateEnabled,\n\tisWarmWebRestoreEligible: () => isWarmWebRestoreEligible,\n\tmatchRoutePattern: () => import_warmStateShared2.matchRoutePattern,\n\tnormalizeHref: () => normalizeHref,\n\tnormalizeRoutePattern: () => import_warmStateShared2.normalizeRoutePattern,\n\treconcileNativeColdDeepLink: () => reconcileNativeColdDeepLink,\n\tregisterWarmStateSource: () => registerWarmStateSource,\n\tscheduleWarmStatePersist: () => scheduleWarmStatePersist,\n\tshouldAttemptWarmRouteRestore: () => shouldAttemptWarmRouteRestore,\n\tshouldRestoreWarmRoute: () => shouldRestoreWarmRoute,\n\ttrackRestoredLaunch: () => trackRestoredLaunch,\n\twaitForWarmRoutePreload: () => waitForWarmRoutePreload\n});\nmodule.exports = __toCommonJS(warmState_exports);\nvar import_constants = require(\"../constants\");\nvar import_extractPathFromURL = require(\"../fork/extractPathFromURL\");\nvar import_getPathFromState = require(\"../fork/getPathFromState\");\nvar import_getStateFromPath = require(\"../fork/getStateFromPath\");\nvar import_storage = require(\"../platform/storage\");\nvar import_findRouteNode = require(\"./findRouteNode\");\nvar import_useViteRoutes = require(\"./useViteRoutes\");\nvar import_warmStateSerialize = require(\"./warmStateSerialize\");\nvar import_warmStateShared = require(\"./warmStateShared\");\nvar import_warmStateShared2 = require(\"./warmStateShared\");\nvar defaultConfig = {\n\tenabled: false,\n\tschemaVersion: 1,\n\tmaxAgeMs: import_warmStateShared.DEFAULT_WARM_STATE_MAX_AGE_MS,\n\trestoreRoute: true,\n\trestoreWebRoute: false,\n\tpreloadRoutes: true,\n\tincludeRoutes: void 0,\n\texcludeRoutes: void 0,\n\talignRoute: void 0,\n\tnow: function now() {\n\t\treturn Date.now();\n\t}\n};\nvar config = { ...defaultConfig };\nvar registeredSources = /* @__PURE__ */ new Map();\nvar hydratedSourceKeys = /* @__PURE__ */ new Set();\nvar loadedFromStorage = false;\nvar hydratedEnvelope = null;\nvar warmRouteApplied = false;\nvar restoredLaunch = false;\nvar restoredState;\nvar restoredPathname;\nvar warmInitialRouteConsumed = false;\nvar latestNavState;\nvar latestPathname;\nvar pendingInput = null;\nvar serializer = null;\nfunction isNativeRuntime() {\n\treturn true;\n}\nfunction isWebClientRuntime() {\n\treturn false;\n}\nfunction isSSRRuntime() {\n\treturn false;\n}\nfunction hasDefaultStorage() {\n\tif (isSSRRuntime()) return false;\n\tif (isNativeRuntime()) return true;\n\treturn typeof localStorage !== \"undefined\";\n}\nfunction getStorage() {\n\tif (config.storage) return config.storage;\n\tif (!hasDefaultStorage()) return null;\n\treturn import_storage.Storage;\n}\nfunction safeReadStorage(key) {\n\tvar storage = getStorage();\n\tif (!storage) return null;\n\ttry {\n\t\treturn storage.getItem(key);\n\t} catch (unused) {\n\t\treturn null;\n\t}\n}\nfunction safeWriteStorage(key, value) {\n\tvar storage = getStorage();\n\tif (!storage) return false;\n\ttry {\n\t\tstorage.setItem(key, value);\n\t\treturn true;\n\t} catch (unused) {\n\t\treturn false;\n\t}\n}\nfunction safeRemoveStorage(key) {\n\tvar storage = getStorage();\n\tif (!storage) return;\n\ttry {\n\t\tstorage.removeItem(key);\n\t} catch (unused) {}\n}\nfunction normalizeWarmFlag(flag) {\n\tvar _flag_enabled;\n\tif (!flag) return null;\n\tif (flag === true) return { enabled: true };\n\treturn {\n\t\tenabled: (_flag_enabled = flag.enabled) !== null && _flag_enabled !== void 0 ? _flag_enabled : true,\n\t\t...flag\n\t};\n}\nfunction configureWarmState(options) {\n\tif (isSSRRuntime()) return;\n\tconfig = {\n\t\t...config,\n\t\t...options.enabled !== void 0 ? { enabled: options.enabled } : {},\n\t\t...options.schemaVersion !== void 0 ? { schemaVersion: options.schemaVersion } : {},\n\t\t...options.maxAgeMs !== void 0 ? { maxAgeMs: options.maxAgeMs } : {},\n\t\t...options.restoreRoute !== void 0 ? { restoreRoute: options.restoreRoute } : {},\n\t\t...options.restoreWebRoute !== void 0 ? { restoreWebRoute: options.restoreWebRoute } : {},\n\t\t...options.preloadRoutes !== void 0 ? { preloadRoutes: options.preloadRoutes } : {},\n\t\t...options.includeRoutes !== void 0 ? { includeRoutes: options.includeRoutes } : {},\n\t\t...options.excludeRoutes !== void 0 ? { excludeRoutes: options.excludeRoutes } : {},\n\t\t...options.alignRoute !== void 0 ? { alignRoute: options.alignRoute } : {},\n\t\t...options.storage !== void 0 ? { storage: options.storage } : {},\n\t\t...options.now !== void 0 ? { now: options.now } : {}\n\t};\n}\nfunction configureWarmStateFromFlags(flags) {\n\tif (isSSRRuntime() || !(flags === null || flags === void 0 ? void 0 : flags.warmStart)) return;\n\tvar normalized = normalizeWarmFlag(flags.warmStart);\n\tif (normalized) configureWarmState(normalized);\n}\nfunction isWarmStateEnabled() {\n\treturn !isSSRRuntime() && config.enabled;\n}\nfunction shouldRestoreWarmRoute() {\n\tif (!isWarmStateEnabled()) return false;\n\tif (isNativeRuntime()) return config.restoreRoute;\n\treturn config.restoreWebRoute;\n}\nfunction hydrateSourceKey(key, source, envelope) {\n\tif (hydratedSourceKeys.has(key)) return;\n\tif (!(key in envelope.sources)) return;\n\tvar payload = envelope.sources[key];\n\tif (source.validate && !source.validate(payload)) return;\n\thydratedSourceKeys.add(key);\n\tsource.hydrate(payload);\n}\nfunction registerWarmStateSource(key, source) {\n\tregisteredSources.set(key, source);\n\tif (!isSSRRuntime() && config.enabled && hydratedEnvelope) hydrateSourceKey(key, source, hydratedEnvelope);\n\treturn function() {\n\t\tregisteredSources.delete(key);\n\t};\n}\nfunction ensureLoadedEnvelope() {\n\tif (!isWarmStateEnabled()) return null;\n\tif (loadedFromStorage) return hydratedEnvelope;\n\tloadedFromStorage = true;\n\tvar raw = safeReadStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\tif (!raw) return null;\n\tvar parsed = (0, import_warmStateShared.parseWarmEnvelope)(raw, {\n\t\tschemaVersion: config.schemaVersion,\n\t\tmaxAgeMs: config.maxAgeMs,\n\t\tnow: config.now()\n\t});\n\tif (!parsed) {\n\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\thydratedEnvelope = null;\n\t\treturn null;\n\t}\n\thydratedEnvelope = parsed;\n\treturn hydratedEnvelope;\n}\nfunction getHydratedWarmState() {\n\tif (!isWarmStateEnabled()) return null;\n\treturn ensureLoadedEnvelope();\n}\nfunction getPathnameFromSnapshot(snapshot) {\n\tvar _snapshot_routes_, _snapshot_index;\n\tvar activeRoute = (_snapshot_routes_ = snapshot.routes[(_snapshot_index = snapshot.index) !== null && _snapshot_index !== void 0 ? _snapshot_index : 0]) !== null && _snapshot_routes_ !== void 0 ? _snapshot_routes_ : snapshot.routes[0];\n\tif (!activeRoute) return void 0;\n\tif (typeof activeRoute.path === \"string\" && activeRoute.path) return activeRoute.path.startsWith(\"/\") ? activeRoute.path : `/${activeRoute.path}`;\n\tif (typeof activeRoute.name === \"string\" && activeRoute.name) return activeRoute.name === \"index\" ? \"/\" : `/${activeRoute.name}`;\n}\nvar cachedAlignedRoute = null;\nfunction getOrEvaluateAlignRoute(envelope) {\n\tvar _envelope_pathname;\n\tif (!config.alignRoute || !envelope.state) return;\n\tif (cachedAlignedRoute && cachedAlignedRoute.evaluated) return cachedAlignedRoute.result;\n\tvar result = config.alignRoute({\n\t\tpathname: (_envelope_pathname = envelope.pathname) !== null && _envelope_pathname !== void 0 ? _envelope_pathname : \"/\",\n\t\tstate: envelope.state\n\t});\n\tcachedAlignedRoute = {\n\t\tevaluated: true,\n\t\tresult\n\t};\n\treturn result;\n}\nvar activeWarmRoutePreload = null;\nvar warmRoutePreloadCompleted = false;\nfunction isWarmRoutePreloadPending() {\n\treturn activeWarmRoutePreload !== null && !warmRoutePreloadCompleted;\n}\nasync function waitForWarmRoutePreload() {\n\tvar timeoutMs = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 200;\n\tif (!activeWarmRoutePreload || warmRoutePreloadCompleted) return;\n\ttry {\n\t\tif (timeoutMs <= 0) {\n\t\t\tawait activeWarmRoutePreload;\n\t\t\treturn;\n\t\t}\n\t\tawait Promise.race([activeWarmRoutePreload, new Promise(function(resolve) {\n\t\t\treturn setTimeout(resolve, timeoutMs);\n\t\t})]);\n\t} catch (unused) {}\n}\nfunction hydrateWarmInitialLoad(options) {\n\tif (isSSRRuntime()) return null;\n\tif (options === null || options === void 0 ? void 0 : options.flags) configureWarmStateFromFlags(options.flags);\n\tif (typeof globalThis !== \"undefined\" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);\n\tif (!config.enabled) return null;\n\tvar envelope = ensureLoadedEnvelope();\n\tif (!envelope) return null;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = registeredSources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [key, source] = _step.value;\n\t\t\thydrateSourceKey(key, source, envelope);\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\tif (config.preloadRoutes && envelope.pathname && (options === null || options === void 0 ? void 0 : options.routes)) {\n\t\tvar _config_excludeRoutes;\n\t\tvar targetPathname = envelope.pathname;\n\t\tvar cleanPath = targetPathname.split(\"?\")[0].split(\"#\")[0] || \"/\";\n\t\tif ((_config_excludeRoutes = config.excludeRoutes) === null || _config_excludeRoutes === void 0 ? void 0 : _config_excludeRoutes.some(function(p) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(p, cleanPath);\n\t\t})) targetPathname = void 0;\n\t\telse if (config.includeRoutes && config.includeRoutes.length > 0 && !config.includeRoutes.some(function(p) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(p, cleanPath);\n\t\t})) targetPathname = void 0;\n\t\telse if (config.alignRoute && envelope.state) {\n\t\t\tvar aligned = getOrEvaluateAlignRoute(envelope);\n\t\t\tif (aligned === false || aligned === null) targetPathname = void 0;\n\t\t\telse if (typeof aligned === \"string\") targetPathname = aligned;\n\t\t\telse if (typeof aligned === \"object\" && aligned !== null) targetPathname = getPathnameFromSnapshot(aligned);\n\t\t}\n\t\tif (targetPathname) {\n\t\t\tglobalThis[\"__importMetaGlobbed\"] = options.routes;\n\t\t\twarmRoutePreloadCompleted = false;\n\t\t\tactiveWarmRoutePreload = (0, import_useViteRoutes.preloadRouteModules)(targetPathname).catch(function() {}).finally(function() {\n\t\t\t\twarmRoutePreloadCompleted = true;\n\t\t\t});\n\t\t}\n\t}\n\treturn envelope;\n}\nfunction routesMatchLinkingConfig(routes, screens) {\n\tif (!screens || Object.keys(screens).length === 0) return true;\n\tfor (var i = 0; i < routes.length; i++) {\n\t\tvar route = routes[i];\n\t\tvar entry = screens[route.name];\n\t\tif (entry === void 0 || entry === null) return false;\n\t\tif (route.state) {\n\t\t\tif (typeof entry !== \"object\" || !entry.screens) return false;\n\t\t\tif (!routesMatchLinkingConfig(route.state.routes, entry.screens)) return false;\n\t\t}\n\t}\n\treturn true;\n}\nfunction getStateFromHref(href, linking) {\n\tvar _ref;\n\tvar _parsed_routes;\n\tvar parsed = ((_ref = linking === null || linking === void 0 ? void 0 : linking.getStateFromPath) !== null && _ref !== void 0 ? _ref : import_getStateFromPath.getStateFromPath)(href, linking === null || linking === void 0 ? void 0 : linking.config);\n\tif (!(parsed === null || parsed === void 0 ? void 0 : (_parsed_routes = parsed.routes) === null || _parsed_routes === void 0 ? void 0 : _parsed_routes.length)) return void 0;\n\treturn parsed;\n}\nfunction evaluateRouteRestore(state, routeNode, pathname) {\n\tvar nodes = (0, import_findRouteNode.findAllRouteNodesFromState)(state, routeNode);\n\tif (nodes[0] !== routeNode) nodes.unshift(routeNode);\n\tvar params;\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = nodes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar node = _step.value;\n\t\t\tvar _node_loadRoute, _node_loadRoute1;\n\t\t\tvar restore = (_node_loadRoute1 = node.loadRoute) === null || _node_loadRoute1 === void 0 ? void 0 : (_node_loadRoute = _node_loadRoute1.call(node)) === null || _node_loadRoute === void 0 ? void 0 : _node_loadRoute.restore;\n\t\t\tif (restore === void 0 || restore === true) continue;\n\t\t\tif (restore === false) return false;\n\t\t\tparams !== null && params !== void 0 || (params = (0, import_findRouteNode.extractParamsFromState)(state));\n\t\t\tvar result = restore({\n\t\t\t\tpathname,\n\t\t\t\tparams\n\t\t\t});\n\t\t\tif (result === false || result === null) return false;\n\t\t\tif (typeof result === \"string\") return result;\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn true;\n}\nfunction consumeWarmInitialNavigationState(routeNode, linking) {\n\tvar _linking_config;\n\tif (isSSRRuntime()) return void 0;\n\tif (typeof globalThis !== \"undefined\" && globalThis.__oneWarmStartOptions) configureWarmState(globalThis.__oneWarmStartOptions);\n\tif (warmInitialRouteConsumed) return restoredLaunch ? restoredState : void 0;\n\tif (!shouldRestoreWarmRoute()) return;\n\twarmInitialRouteConsumed = true;\n\tvar envelope = hydrateWarmInitialLoad();\n\tif (!(envelope === null || envelope === void 0 ? void 0 : envelope.state) || !routeNode) return void 0;\n\tvar savedPathname = (envelope.pathname || \"/\").split(\"?\")[0].split(\"#\")[0] || \"/\";\n\tif (config.excludeRoutes && config.excludeRoutes.length > 0) {\n\t\tif (config.excludeRoutes.some(function(pattern) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(pattern, savedPathname);\n\t\t})) return;\n\t}\n\tif (config.includeRoutes && config.includeRoutes.length > 0) {\n\t\tif (!config.includeRoutes.some(function(pattern) {\n\t\t\treturn (0, import_warmStateShared.matchRoutePattern)(pattern, savedPathname);\n\t\t})) return;\n\t}\n\tvar targetState = envelope.state;\n\tif (config.alignRoute) {\n\t\tvar aligned = getOrEvaluateAlignRoute(envelope);\n\t\tif (aligned === false || aligned === null) return;\n\t\tif (typeof aligned === \"string\") {\n\t\t\tvar parsed = getStateFromHref(aligned, linking);\n\t\t\tif (!parsed) return void 0;\n\t\t\ttargetState = parsed;\n\t\t\tenvelope.pathname = aligned;\n\t\t} else if (typeof aligned === \"object\" && aligned !== null) {\n\t\t\tif (!aligned.routes || !Array.isArray(aligned.routes) || aligned.routes.length === 0) return;\n\t\t\ttargetState = aligned;\n\t\t\tvar derivedPath = getPathnameFromSnapshot(aligned);\n\t\t\tif (derivedPath) envelope.pathname = derivedPath;\n\t\t}\n\t}\n\tvar restore;\n\ttry {\n\t\trestore = evaluateRouteRestore(targetState, routeNode, envelope.pathname || \"/\");\n\t} catch (error) {\n\t\twarmInitialRouteConsumed = false;\n\t\tthrow error;\n\t}\n\tif (restore === false) return void 0;\n\tif (typeof restore === \"string\") {\n\t\tvar parsed1 = getStateFromHref(restore, linking);\n\t\tif (!parsed1) return void 0;\n\t\ttargetState = parsed1;\n\t\tenvelope.pathname = restore;\n\t}\n\tif (!routesMatchLinkingConfig(targetState.routes, linking === null || linking === void 0 ? void 0 : (_linking_config = linking.config) === null || _linking_config === void 0 ? void 0 : _linking_config.screens)) {\n\t\tif (targetState === envelope.state) {\n\t\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\t\thydratedEnvelope = null;\n\t\t}\n\t\treturn;\n\t}\n\ttry {\n\t\t(0, import_getPathFromState.getPathDataFromState)(targetState, {\n\t\t\tscreens: [],\n\t\t\t...linking === null || linking === void 0 ? void 0 : linking.config\n\t\t});\n\t} catch (unused) {\n\t\tif (targetState === envelope.state) {\n\t\t\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\t\t\thydratedEnvelope = null;\n\t\t}\n\t\treturn;\n\t}\n\twarmRouteApplied = true;\n\trestoredLaunch = true;\n\trestoredPathname = (envelope.pathname || \"/\").split(\"?\")[0].split(\"#\")[0] || \"/\";\n\trestoredState = targetState;\n\treturn restoredState;\n}\nfunction shouldAttemptWarmRouteRestore(initialLocation) {\n\tif (!shouldRestoreWarmRoute()) return false;\n\treturn isNativeRuntime() || isWarmWebRestoreEligible(initialLocation);\n}\nfunction isWarmWebRestoreEligible(initialLocation) {\n\tvar _globalThis_SERVER_CONTEXT_KEY;\n\tif (!isWebClientRuntime() || !config.restoreWebRoute || !initialLocation) return false;\n\tvar serverMode = (_globalThis_SERVER_CONTEXT_KEY = globalThis[import_constants.SERVER_CONTEXT_KEY]) === null || _globalThis_SERVER_CONTEXT_KEY === void 0 ? void 0 : _globalThis_SERVER_CONTEXT_KEY.mode;\n\tif (serverMode !== \"spa\" && serverMode !== \"spa-shell\") return false;\n\treturn initialLocation.pathname === \"/\" && !initialLocation.search && !initialLocation.hash;\n}\nfunction isWarmRouteApplied() {\n\treturn warmRouteApplied;\n}\nfunction isRestoredLaunch() {\n\treturn restoredLaunch;\n}\nfunction trackRestoredLaunch(pathname) {\n\tif (!restoredLaunch || pathname === restoredPathname) return;\n\trestoredLaunch = false;\n\trestoredState = void 0;\n}\nfunction consumeWarmRouteApplied() {\n\tif (!warmRouteApplied) return false;\n\twarmRouteApplied = false;\n\treturn true;\n}\nfunction ensureSerializer() {\n\tif (serializer) return serializer;\n\tserializer = (0, import_warmStateSerialize.createWarmSerializer)(function(state) {\n\t\tif (state.phase !== \"ready\") return;\n\t\tif (!pendingInput) return;\n\t\tif (safeWriteStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY, state.result.value.json)) pendingInput = null;\n\t});\n\treturn serializer;\n}\nfunction collectSources() {\n\tvar sources = {};\n\tvar _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;\n\ttry {\n\t\tfor (var _iterator = registeredSources[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {\n\t\t\tvar [key, source] = _step.value;\n\t\t\tsources[key] = source.getSnapshot();\n\t\t}\n\t} catch (err) {\n\t\t_didIteratorError = true;\n\t\t_iteratorError = err;\n\t} finally {\n\t\ttry {\n\t\t\tif (!_iteratorNormalCompletion && _iterator.return != null) _iterator.return();\n\t\t} finally {\n\t\t\tif (_didIteratorError) throw _iteratorError;\n\t\t}\n\t}\n\treturn sources;\n}\nfunction scheduleWarmStatePersist(navState, pathname) {\n\tif (!isWarmStateEnabled()) return;\n\tif (navState !== void 0) latestNavState = navState;\n\tif (pathname !== void 0) latestPathname = pathname;\n\tvar input = {\n\t\tschemaVersion: config.schemaVersion,\n\t\tupdatedAt: config.now(),\n\t\tpathname: latestPathname,\n\t\tstate: latestNavState,\n\t\tsources: collectSources()\n\t};\n\tpendingInput = input;\n\tensureSerializer().update(input);\n}\nfunction flushWarmState() {\n\tif (!isWarmStateEnabled() || !pendingInput) return false;\n\tvar input = pendingInput;\n\tpendingInput = null;\n\tvar { json } = (0, import_warmStateShared.serializeWarmInputSync)(input);\n\treturn safeWriteStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY, json);\n}\nfunction clearWarmState(options) {\n\tsafeRemoveStorage(import_warmStateShared.WARM_STATE_STORAGE_KEY);\n\tloadedFromStorage = false;\n\thydratedEnvelope = null;\n\thydratedSourceKeys.clear();\n\twarmRouteApplied = false;\n\trestoredLaunch = false;\n\trestoredState = void 0;\n\twarmInitialRouteConsumed = false;\n\tlatestNavState = void 0;\n\tlatestPathname = void 0;\n\tpendingInput = null;\n\tserializer === null || serializer === void 0 || serializer.dispose();\n\tserializer = null;\n\tactiveWarmRoutePreload = null;\n\twarmRoutePreloadCompleted = false;\n\tcachedAlignedRoute = null;\n\tdelete globalThis[\"__importMetaGlobbed\"];\n\tif (!(options === null || options === void 0 ? void 0 : options.keepConfig)) {\n\t\tconfig = { ...defaultConfig };\n\t\tregisteredSources.clear();\n\t}\n}\nfunction normalizeHref(href) {\n\tvar [withoutHash, ...hashParts] = (href.startsWith(\"/\") ? href : `/${href}`).split(\"#\");\n\tvar hash = hashParts.length > 0 ? `#${hashParts.join(\"#\")}` : \"\";\n\tvar [pathname, ...queryParts] = withoutHash.split(\"?\");\n\tvar query = queryParts.length > 0 ? `?${queryParts.join(\"?\")}` : \"\";\n\treturn `${pathname.length > 1 && pathname.endsWith(\"/\") ? pathname.slice(0, -1) : pathname}${query}${hash}`;\n}\nasync function reconcileNativeColdDeepLink(options) {\n\tvar _options_prefixes, _options_currentHref;\n\tvar _options_onComplete;\n\tif (isSSRRuntime()) return null;\n\tvar initialUrl = null;\n\ttry {\n\t\tinitialUrl = await options.getInitialURL();\n\t} catch (unused) {\n\t\tvar _options_onComplete1;\n\t\t(_options_onComplete1 = options.onComplete) === null || _options_onComplete1 === void 0 || _options_onComplete1.call(options, null);\n\t\treturn null;\n\t}\n\tif (!initialUrl) {\n\t\tvar _options_onComplete2;\n\t\t(_options_onComplete2 = options.onComplete) === null || _options_onComplete2 === void 0 || _options_onComplete2.call(options, null);\n\t\treturn null;\n\t}\n\tvar extracted = (0, import_extractPathFromURL.extractPathFromURL)((_options_prefixes = options.prefixes) !== null && _options_prefixes !== void 0 ? _options_prefixes : [], initialUrl);\n\tif (!extracted) {\n\t\tvar _options_onComplete3;\n\t\t(_options_onComplete3 = options.onComplete) === null || _options_onComplete3 === void 0 || _options_onComplete3.call(options, null);\n\t\treturn null;\n\t}\n\tvar normalizedTarget = normalizeHref(extracted);\n\tvar current = (_options_currentHref = options.currentHref) !== null && _options_currentHref !== void 0 ? _options_currentHref : options.currentPathname;\n\tvar normalizedCurrent = current ? normalizeHref(current) : void 0;\n\tif (normalizedCurrent && normalizedTarget === normalizedCurrent) {\n\t\tvar _options_onComplete4;\n\t\t(_options_onComplete4 = options.onComplete) === null || _options_onComplete4 === void 0 || _options_onComplete4.call(options, null);\n\t\treturn null;\n\t}\n\ttrackRestoredLaunch(normalizedTarget);\n\toptions.navigateTo(normalizedTarget);\n\t(_options_onComplete = options.onComplete) === null || _options_onComplete === void 0 || _options_onComplete.call(options, normalizedTarget);\n\treturn normalizedTarget;\n}\n//# sourceMappingURL=warmState.js.map\n"],"mappings":";;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC/B,KAAK,IAAI,QAAQ,KAAK,UAAU,QAAQ,MAAM;EAC7C,KAAK,IAAI;EACT,YAAY;CACb,CAAC;AACF;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EACnE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GAAG,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,UAAU,IAAI,KAAK;GAC9G,WAAW,KAAK;GAChB,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAC3D,CAAC;CACF;CACA,OAAO;AACR;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,oBAAoB,CAAC;AACzB,SAAS,mBAAmB;CAC3B,sBAAsB;CACtB,0BAA0B;CAC1B,mCAAmC;CACnC,yCAAyC;CACzC,+BAA+B;CAC/B,sBAAsB;CACtB,4BAA4B;CAC5B,8BAA8B;CAC9B,wBAAwB;CACxB,0BAA0B;CAC1B,iCAAiC;CACjC,0BAA0B;CAC1B,gCAAgC;CAChC,yBAAyB,wBAAwB;CACjD,qBAAqB;CACrB,6BAA6B,wBAAwB;CACrD,mCAAm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