@workflow/web 5.3.2 → 5.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/build/client/assets/app-CmaRLUwS.css +1 -0
  2. package/build/client/assets/arrow-up-right-AHTyWXU2.js +9 -0
  3. package/build/client/assets/{entry.client-xzxVCL3o.js → entry.client-BqbaswKw.js} +13 -35
  4. package/build/client/assets/{highlighted-body-JLMTFACH-1yzOVKg0.js → highlighted-body-JLMTFACH-_kzpqYmW.js} +2 -2
  5. package/build/client/assets/{home--wf0CrF6.js → home-DjUPTrY5.js} +91 -161
  6. package/build/client/assets/{index-wl5l5E8H.js → index-BUQuaV5X.js} +78 -149
  7. package/build/client/assets/{manifest-7b81d8d4.js → manifest-9126df65.js} +1 -1
  8. package/build/client/assets/{mermaid-WFAXDIZX-CB__BxYb.js → mermaid-WFAXDIZX-CNo_0yWo.js} +1236 -1340
  9. package/build/client/assets/mermaid-WFAXDIZX-F88p7PFX.css +1 -0
  10. package/build/client/assets/{root-C1XwTNUK.js → root-Bh-E5He-.js} +7 -31
  11. package/build/client/assets/root-kJB77No4.css +1 -0
  12. package/build/client/assets/{rpc-client-SbyXJdFV.js → rpc-client-DL_nSX36.js} +3 -4
  13. package/build/client/assets/{run-detail-2CnpdXm1.js → run-detail-5dPVsaSm.js} +121 -203
  14. package/build/client/assets/{run-usage-DRV6lopZ.js → run-usage-BEswHGKU.js} +15 -24
  15. package/build/client/assets/{run-usage-C3aywyqa.js → run-usage-C_wyncgV.js} +5 -5
  16. package/build/client/assets/{skeleton-DMLgjvZZ.js → skeleton-DE14mNQw.js} +3 -21
  17. package/build/client/assets/{url-state-JAVaNZ_m.js → url-state-5GKQwo-f.js} +471 -702
  18. package/build/client/assets/{zstd-browser-decoder-Z5736ep5.js → zstd-browser-decoder-CbTMLAMd.js} +2 -2
  19. package/build/server/assets/{app-C4Vf0mu1.js → app-C-e60j14.js} +11450 -12386
  20. package/build/server/assets/{esm-CETb4fkq.js → esm-BzrGWk7J.js} +2 -2
  21. package/build/server/assets/{highlighted-body-JLMTFACH-CF_5tt3-.js → highlighted-body-JLMTFACH-B7y0X_Kn.js} +1 -1
  22. package/build/server/assets/{index-BrYeW--s.js → index-DRDsjR--.js} +398 -490
  23. package/build/server/assets/{mermaid-WFAXDIZX-BHZz_uL6.js → mermaid-WFAXDIZX-MsPxEM1Y.js} +1 -1
  24. package/build/server/assets/{token-B94O3LuJ.js → token-CKgyaeCJ.js} +5 -5
  25. package/build/server/assets/{token-k0na1G9v.js → token-DXh0TnqB.js} +6 -6
  26. package/build/server/assets/{token-util-DFlzY9Hw.js → token-util-CCc0uYVy.js} +2 -2
  27. package/build/server/assets/{token-util-DgTmPzWb.js → token-util-DOHYMq7D.js} +1 -1
  28. package/build/server/assets/{wrapper-BEqyNEir.js → wrapper-BzLz38Oh.js} +2 -2
  29. package/build/server/assets/{zstd-browser-decoder-LnaKiDUZ.js → zstd-browser-decoder-BSSEC3XP.js} +1 -1
  30. package/build/server/index.js +1 -1
  31. package/package.json +8 -8
  32. package/build/client/assets/app-BHCSMHev.css +0 -1
  33. package/build/client/assets/arrow-up-right-DyaB_ak4.js +0 -15
  34. package/build/client/assets/mermaid-WFAXDIZX-D8CjRQta.css +0 -1
  35. package/build/client/assets/root-C3ED6Dwc.css +0 -1
@@ -22,20 +22,11 @@ function getDefaultExportFromCjs(x) {
22
22
  }
23
23
  var jsxRuntime = { exports: {} };
24
24
  var reactJsxRuntime_production = {};
25
- /**
26
- * @license React
27
- * react-jsx-runtime.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */
34
25
  var hasRequiredReactJsxRuntime_production;
35
26
  function requireReactJsxRuntime_production() {
36
27
  if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
37
28
  hasRequiredReactJsxRuntime_production = 1;
38
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
29
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
39
30
  function jsxProd(type, config, maybeKey) {
40
31
  var key = null;
41
32
  void 0 !== maybeKey && (key = "" + maybeKey);
@@ -71,20 +62,11 @@ function requireJsxRuntime() {
71
62
  var jsxRuntimeExports = requireJsxRuntime();
72
63
  var react = { exports: {} };
73
64
  var react_production = {};
74
- /**
75
- * @license React
76
- * react.production.js
77
- *
78
- * Copyright (c) Meta Platforms, Inc. and affiliates.
79
- *
80
- * This source code is licensed under the MIT license found in the
81
- * LICENSE file in the root directory of this source tree.
82
- */
83
65
  var hasRequiredReact_production;
84
66
  function requireReact_production() {
85
67
  if (hasRequiredReact_production) return react_production;
86
68
  hasRequiredReact_production = 1;
87
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
69
+ var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler"), REACT_CONSUMER_TYPE = /* @__PURE__ */ Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense"), REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo"), REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = /* @__PURE__ */ Symbol.for("react.activity"), REACT_VIEW_TRANSITION_TYPE = /* @__PURE__ */ Symbol.for("react.view_transition"), MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
88
70
  function getIteratorFn(maybeIterable) {
89
71
  if (null === maybeIterable || "object" !== typeof maybeIterable) return null;
90
72
  maybeIterable = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable["@@iterator"];
@@ -532,15 +514,6 @@ const React2 = /* @__PURE__ */ _mergeNamespaces({
532
514
  }, [reactExports]);
533
515
  var reactDom = { exports: {} };
534
516
  var reactDom_production = {};
535
- /**
536
- * @license React
537
- * react-dom.production.js
538
- *
539
- * Copyright (c) Meta Platforms, Inc. and affiliates.
540
- *
541
- * This source code is licensed under the MIT license found in the
542
- * LICENSE file in the root directory of this source tree.
543
- */
544
517
  var hasRequiredReactDom_production;
545
518
  function requireReactDom_production() {
546
519
  if (hasRequiredReactDom_production) return reactDom_production;
@@ -573,7 +546,7 @@ function requireReactDom_production() {
573
546
  },
574
547
  p: 0,
575
548
  findDOMNode: null
576
- }, REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = Symbol.for("react.optimistic_key");
549
+ }, REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal"), REACT_RECOVERABLE_TYPE = /* @__PURE__ */ Symbol.for("react.recoverable"), REACT_OPTIMISTIC_KEY = /* @__PURE__ */ Symbol.for("react.optimistic_key");
577
550
  function createPortal$1(children, containerInfo, implementation) {
578
551
  var key = 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;
579
552
  return {
@@ -714,16 +687,6 @@ function requireReactDom() {
714
687
  }
715
688
  return reactDom.exports;
716
689
  }
717
- /**
718
- * react-router v7.18.5
719
- *
720
- * Copyright (c) Remix Software Inc.
721
- *
722
- * This source code is licensed under the MIT license found in the
723
- * LICENSE.md file in the root directory of this source tree.
724
- *
725
- * @license MIT
726
- */
727
690
  var __typeError = (msg) => {
728
691
  throw TypeError(msg);
729
692
  };
@@ -742,8 +705,7 @@ function isLocation(obj) {
742
705
  }
743
706
  function createBrowserHistory(options = {}) {
744
707
  function createBrowserLocation(window2, globalHistory) {
745
- var _a;
746
- let maskedLocation = (_a = globalHistory.state) == null ? void 0 : _a.masked;
708
+ let maskedLocation = globalHistory.state?.masked;
747
709
  let { pathname, search, hash } = maskedLocation || window2.location;
748
710
  return createLocation(
749
711
  "",
@@ -1172,8 +1134,7 @@ function flattenRoutes(routes, branches = [], parentsMeta = [], parentPath = "",
1172
1134
  });
1173
1135
  };
1174
1136
  routes.forEach((route, index) => {
1175
- var _a;
1176
- if (route.path === "" || !((_a = route.path) == null ? void 0 : _a.includes("?"))) {
1137
+ if (route.path === "" || !route.path?.includes("?")) {
1177
1138
  flattenRoute(route, index);
1178
1139
  } else {
1179
1140
  for (let exploded of explodeOptionalSegments(route.path)) {
@@ -1600,7 +1561,7 @@ function parseToInfo(_to, basename) {
1600
1561
  to
1601
1562
  };
1602
1563
  }
1603
- var UninstrumentedSymbol = Symbol("Uninstrumented");
1564
+ var UninstrumentedSymbol = /* @__PURE__ */ Symbol("Uninstrumented");
1604
1565
  function getRouteInstrumentationUpdates(fns, route) {
1605
1566
  let aggregated = {
1606
1567
  lazy: [],
@@ -1932,7 +1893,7 @@ var defaultMapRouteProperties = (route) => ({
1932
1893
  hasErrorBoundary: Boolean(route.hasErrorBoundary)
1933
1894
  });
1934
1895
  var TRANSITIONS_STORAGE_KEY = "remix-router-transitions";
1935
- var ResetLoaderDataSymbol = Symbol("ResetLoaderData");
1896
+ var ResetLoaderDataSymbol = /* @__PURE__ */ Symbol("ResetLoaderData");
1936
1897
  var _routes, _branches, _hmrRoutes, _hmrBranches;
1937
1898
  var DataRoutes = class {
1938
1899
  constructor(routes) {
@@ -2176,7 +2137,7 @@ function createRouter(init) {
2176
2137
  updateState({ blockers });
2177
2138
  }
2178
2139
  });
2179
- pendingPopstateNavigationDfd == null ? void 0 : pendingPopstateNavigationDfd.resolve();
2140
+ pendingPopstateNavigationDfd?.resolve();
2180
2141
  pendingPopstateNavigationDfd = null;
2181
2142
  return;
2182
2143
  }
@@ -2271,8 +2232,7 @@ function createRouter(init) {
2271
2232
  mountedFetchers.forEach((key) => state.fetchers.delete(key));
2272
2233
  }
2273
2234
  function completeNavigation(location, newState, { flushSync } = {}) {
2274
- var _a, _b;
2275
- let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && ((_a = location.state) == null ? void 0 : _a._isRedirect) !== true;
2235
+ let isActionReload = state.actionData != null && state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && state.navigation.state === "loading" && location.state?._isRedirect !== true;
2276
2236
  let actionData;
2277
2237
  if (newState.actionData) {
2278
2238
  if (Object.keys(newState.actionData).length > 0) {
@@ -2297,7 +2257,7 @@ function createRouter(init) {
2297
2257
  blockers.forEach((_, k) => blockers.set(k, IDLE_BLOCKER));
2298
2258
  }
2299
2259
  let restoreScrollPosition = isUninterruptedRevalidation ? false : getSavedScrollPosition(location, newState.matches || state.matches);
2300
- let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && ((_b = location.state) == null ? void 0 : _b._isRedirect) !== true;
2260
+ let preventScrollReset = pendingPreventScrollReset === true || state.navigation.formMethod != null && isMutationMethod(state.navigation.formMethod) && location.state?._isRedirect !== true;
2301
2261
  dataRoutes.commitHmrRoutes();
2302
2262
  if (isUninterruptedRevalidation) ;
2303
2263
  else if (pendingAction === "POP") ;
@@ -2359,13 +2319,13 @@ function createRouter(init) {
2359
2319
  pendingViewTransitionEnabled = false;
2360
2320
  isUninterruptedRevalidation = false;
2361
2321
  isRevalidationRequired = false;
2362
- pendingPopstateNavigationDfd == null ? void 0 : pendingPopstateNavigationDfd.resolve();
2322
+ pendingPopstateNavigationDfd?.resolve();
2363
2323
  pendingPopstateNavigationDfd = null;
2364
- pendingRevalidationDfd == null ? void 0 : pendingRevalidationDfd.resolve();
2324
+ pendingRevalidationDfd?.resolve();
2365
2325
  pendingRevalidationDfd = null;
2366
2326
  }
2367
2327
  async function navigate(to, opts) {
2368
- pendingPopstateNavigationDfd == null ? void 0 : pendingPopstateNavigationDfd.resolve();
2328
+ pendingPopstateNavigationDfd?.resolve();
2369
2329
  pendingPopstateNavigationDfd = null;
2370
2330
  if (typeof to === "number") {
2371
2331
  if (!pendingPopstateNavigationDfd) {
@@ -2380,8 +2340,8 @@ function createRouter(init) {
2380
2340
  state.matches,
2381
2341
  basename,
2382
2342
  to,
2383
- opts == null ? void 0 : opts.fromRouteId,
2384
- opts == null ? void 0 : opts.relative
2343
+ opts?.fromRouteId,
2344
+ opts?.relative
2385
2345
  );
2386
2346
  let { path, submission, error } = normalizeNavigateOptions(
2387
2347
  false,
@@ -2389,7 +2349,7 @@ function createRouter(init) {
2389
2349
  opts
2390
2350
  );
2391
2351
  let maskPath;
2392
- if (opts == null ? void 0 : opts.mask) {
2352
+ if (opts?.mask) {
2393
2353
  let partialPath = typeof opts.mask === "string" ? parsePath(opts.mask) : {
2394
2354
  ...state.location.mask,
2395
2355
  ...opts.mask
@@ -2513,7 +2473,7 @@ function createRouter(init) {
2513
2473
  pendingPreventScrollReset = (opts && opts.preventScrollReset) === true;
2514
2474
  pendingViewTransitionEnabled = (opts && opts.enableViewTransition) === true;
2515
2475
  let routesToUse = dataRoutes.activeRoutes;
2516
- let matches = (opts == null ? void 0 : opts.initialHydration) && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
2476
+ let matches = opts?.initialHydration && state.matches && state.matches.length > 0 && !initialMatchesIsFOW ? (
2517
2477
  // `matchRoutes()` has already been called if we're in here via `router.initialize()`
2518
2478
  state.matches
2519
2479
  ) : matchRoutesImpl(
@@ -3014,7 +2974,7 @@ function createRouter(init) {
3014
2974
  basename,
3015
2975
  href,
3016
2976
  routeId,
3017
- opts == null ? void 0 : opts.relative
2977
+ opts?.relative
3018
2978
  );
3019
2979
  let matches = matchRoutesImpl(
3020
2980
  routesToUse,
@@ -3431,7 +3391,7 @@ function createRouter(init) {
3431
3391
  replace: replace2
3432
3392
  } = {}) {
3433
3393
  if (!isNavigation) {
3434
- pendingPopstateNavigationDfd == null ? void 0 : pendingPopstateNavigationDfd.resolve();
3394
+ pendingPopstateNavigationDfd?.resolve();
3435
3395
  pendingPopstateNavigationDfd = null;
3436
3396
  }
3437
3397
  if (redirect2.response.headers.has("X-Remix-Revalidate")) {
@@ -3510,7 +3470,6 @@ function createRouter(init) {
3510
3470
  }
3511
3471
  }
3512
3472
  async function callDataStrategy(request, path, matches, scopedContext, fetcherKey) {
3513
- var _a;
3514
3473
  let results;
3515
3474
  let dataResults = {};
3516
3475
  try {
@@ -3537,7 +3496,7 @@ function createRouter(init) {
3537
3496
  }
3538
3497
  if (!isMutationMethod(request.method)) {
3539
3498
  for (let match of matches) {
3540
- if (((_a = results[match.route.id]) == null ? void 0 : _a.type) === "error") {
3499
+ if (results[match.route.id]?.type === "error") {
3541
3500
  break;
3542
3501
  }
3543
3502
  if (!results.hasOwnProperty(match.route.id) && !state.loaderData.hasOwnProperty(match.route.id) && (!state.errors || !state.errors.hasOwnProperty(match.route.id)) && match.shouldCallHandler()) {
@@ -3650,7 +3609,7 @@ function createRouter(init) {
3650
3609
  return state.fetchers.get(key) || IDLE_FETCHER;
3651
3610
  }
3652
3611
  function resetFetcher(key, opts) {
3653
- abortFetcher(key, opts == null ? void 0 : opts.reason);
3612
+ abortFetcher(key, opts?.reason);
3654
3613
  updateFetcherState(key, getDoneFetcher(null));
3655
3614
  }
3656
3615
  function deleteFetcher(fetchers, key) {
@@ -4152,7 +4111,6 @@ function normalizeNavigateOptions(isFetcher, path, opts) {
4152
4111
  return { path: createPath(parsedPath), submission };
4153
4112
  }
4154
4113
  function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest, history, state, matches, submission, location, lazyRoutePropertiesToSkip, initialHydration, isRevalidationRequired, cancelledFetcherLoads, fetchersQueuedForDeletion, fetchLoadMatches, fetchRedirectIds, routesToUse, basename, hasPatchRoutesOnNavigation, branches, pendingActionResult, callSiteDefaultShouldRevalidate) {
4155
- var _a;
4156
4114
  let actionResult = pendingActionResult ? isErrorResult(pendingActionResult[1]) ? pendingActionResult[1].error : pendingActionResult[1].data : void 0;
4157
4115
  let currentUrl = history.createURL(state.location);
4158
4116
  let nextUrl = history.createURL(location);
@@ -4168,7 +4126,7 @@ function getMatchesToLoad(request, scopedContext, mapRouteProperties2, manifest,
4168
4126
  let shouldSkipRevalidation = actionStatus && actionStatus >= 400;
4169
4127
  let baseShouldRevalidateArgs = {
4170
4128
  currentUrl,
4171
- currentParams: ((_a = state.matches[0]) == null ? void 0 : _a.params) || {},
4129
+ currentParams: state.matches[0]?.params || {},
4172
4130
  nextUrl,
4173
4131
  nextParams: matches[0].params,
4174
4132
  ...submission,
@@ -4426,7 +4384,7 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
4426
4384
  let newRoutes = convertRoutesToDataRoutes(
4427
4385
  uniqueChildren,
4428
4386
  mapRouteProperties2,
4429
- [routeId || "_", "patch", String((childrenToPatch == null ? void 0 : childrenToPatch.length) || "0")],
4387
+ [routeId || "_", "patch", String(childrenToPatch?.length || "0")],
4430
4388
  manifest
4431
4389
  );
4432
4390
  childrenToPatch.push(...newRoutes);
@@ -4456,7 +4414,6 @@ function patchRoutesImpl(routeId, children, dataRoutes, manifest, mapRouteProper
4456
4414
  }
4457
4415
  }
4458
4416
  function isSameRoute(newRoute, existingRoute) {
4459
- var _a;
4460
4417
  if ("id" in newRoute && "id" in existingRoute && newRoute.id === existingRoute.id) {
4461
4418
  return true;
4462
4419
  }
@@ -4466,12 +4423,9 @@ function isSameRoute(newRoute, existingRoute) {
4466
4423
  if ((!newRoute.children || newRoute.children.length === 0) && (!existingRoute.children || existingRoute.children.length === 0)) {
4467
4424
  return true;
4468
4425
  }
4469
- return ((_a = newRoute.children) == null ? void 0 : _a.every(
4470
- (aChild, i) => {
4471
- var _a2;
4472
- return (_a2 = existingRoute.children) == null ? void 0 : _a2.some((bChild) => isSameRoute(aChild, bChild));
4473
- }
4474
- )) ?? false;
4426
+ return newRoute.children?.every(
4427
+ (aChild, i) => existingRoute.children?.some((bChild) => isSameRoute(aChild, bChild))
4428
+ ) ?? false;
4475
4429
  }
4476
4430
  var lazyRoutePropertyCache = /* @__PURE__ */ new WeakMap();
4477
4431
  var loadLazyRouteProperty = ({
@@ -4618,9 +4572,9 @@ function loadLazyRoute(route, type, manifest, mapRouteProperties2, lazyRouteProp
4618
4572
  }
4619
4573
  let lazyRoutePromise = lazyPropertyPromises.length > 0 ? Promise.all(lazyPropertyPromises).then(() => {
4620
4574
  }) : void 0;
4621
- lazyRoutePromise == null ? void 0 : lazyRoutePromise.catch(() => {
4575
+ lazyRoutePromise?.catch(() => {
4622
4576
  });
4623
- lazyHandlerPromise == null ? void 0 : lazyHandlerPromise.catch(() => {
4577
+ lazyHandlerPromise?.catch(() => {
4624
4578
  });
4625
4579
  return {
4626
4580
  lazyRoutePromise,
@@ -4813,8 +4767,8 @@ function getDataStrategyMatch(mapRouteProperties2, manifest, request, path, patt
4813
4767
  path,
4814
4768
  pattern,
4815
4769
  match,
4816
- lazyHandlerPromise: _lazyPromises == null ? void 0 : _lazyPromises.handler,
4817
- lazyRoutePromise: _lazyPromises == null ? void 0 : _lazyPromises.route,
4770
+ lazyHandlerPromise: _lazyPromises?.handler,
4771
+ lazyRoutePromise: _lazyPromises?.route,
4818
4772
  handlerOverride,
4819
4773
  scopedContext
4820
4774
  });
@@ -4856,14 +4810,8 @@ function getTargetedDataStrategyMatches(mapRouteProperties2, manifest, request,
4856
4810
  });
4857
4811
  }
4858
4812
  async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fetcherKey, scopedContext, isStaticHandler) {
4859
- if (matches.some((m) => {
4860
- var _a;
4861
- return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
4862
- })) {
4863
- await Promise.all(matches.map((m) => {
4864
- var _a;
4865
- return (_a = m._lazyPromises) == null ? void 0 : _a.middleware;
4866
- }));
4813
+ if (matches.some((m) => m._lazyPromises?.middleware)) {
4814
+ await Promise.all(matches.map((m) => m._lazyPromises?.middleware));
4867
4815
  }
4868
4816
  let dataStrategyArgs = {
4869
4817
  request,
@@ -4894,13 +4842,10 @@ async function callDataStrategyImpl(dataStrategyImpl, request, path, matches, fe
4894
4842
  });
4895
4843
  try {
4896
4844
  await Promise.all(
4897
- matches.flatMap((m) => {
4898
- var _a, _b;
4899
- return [
4900
- (_a = m._lazyPromises) == null ? void 0 : _a.handler,
4901
- (_b = m._lazyPromises) == null ? void 0 : _b.route
4902
- ];
4903
- })
4845
+ matches.flatMap((m) => [
4846
+ m._lazyPromises?.handler,
4847
+ m._lazyPromises?.route
4848
+ ])
4904
4849
  );
4905
4850
  } catch (e) {
4906
4851
  }
@@ -5017,7 +4962,6 @@ async function parseResponseBody(response) {
5017
4962
  return response.text();
5018
4963
  }
5019
4964
  async function convertDataStrategyResultToDataResult(dataStrategyResult) {
5020
- var _a, _b, _c, _d, _e;
5021
4965
  let { result, type } = dataStrategyResult;
5022
4966
  if (isResponse(result)) {
5023
4967
  let data2;
@@ -5047,15 +4991,15 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
5047
4991
  return {
5048
4992
  type: "error",
5049
4993
  error: result.data,
5050
- statusCode: (_a = result.init) == null ? void 0 : _a.status,
5051
- headers: ((_b = result.init) == null ? void 0 : _b.headers) ? new Headers(result.init.headers) : void 0
4994
+ statusCode: result.init?.status,
4995
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
5052
4996
  };
5053
4997
  }
5054
4998
  return {
5055
4999
  type: "error",
5056
5000
  error: dataWithResponseInitToErrorResponse(result),
5057
5001
  statusCode: isRouteErrorResponse(result) ? result.status : void 0,
5058
- headers: ((_c = result.init) == null ? void 0 : _c.headers) ? new Headers(result.init.headers) : void 0
5002
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
5059
5003
  };
5060
5004
  }
5061
5005
  return {
@@ -5068,8 +5012,8 @@ async function convertDataStrategyResultToDataResult(dataStrategyResult) {
5068
5012
  return {
5069
5013
  type: "data",
5070
5014
  data: result.data,
5071
- statusCode: (_d = result.init) == null ? void 0 : _d.status,
5072
- headers: ((_e = result.init) == null ? void 0 : _e.headers) ? new Headers(result.init.headers) : void 0
5015
+ statusCode: result.init?.status,
5016
+ headers: result.init?.headers ? new Headers(result.init.headers) : void 0
5073
5017
  };
5074
5018
  }
5075
5019
  return { type: "data", data: result };
@@ -5268,7 +5212,7 @@ function processLoaderData(state, matches, results, pendingActionResult, revalid
5268
5212
  let result = fetcherResults[key];
5269
5213
  invariant(result, "Did not find corresponding fetcher result");
5270
5214
  if (isErrorResult(result)) {
5271
- let boundaryMatch = findNearestBoundary(state.matches, match == null ? void 0 : match.route.id);
5215
+ let boundaryMatch = findNearestBoundary(state.matches, match?.route.id);
5272
5216
  if (!(errors && errors[boundaryMatch.route.id])) {
5273
5217
  errors = {
5274
5218
  ...errors,
@@ -5398,10 +5342,9 @@ function isHashChangeOnly(a, b) {
5398
5342
  return false;
5399
5343
  }
5400
5344
  function dataWithResponseInitToErrorResponse(data2) {
5401
- var _a, _b;
5402
5345
  return new ErrorResponseImpl(
5403
- ((_a = data2.init) == null ? void 0 : _a.status) ?? 500,
5404
- ((_b = data2.init) == null ? void 0 : _b.statusText) ?? "Internal Server Error",
5346
+ data2.init?.status ?? 500,
5347
+ data2.init?.statusText ?? "Internal Server Error",
5405
5348
  data2.data
5406
5349
  );
5407
5350
  }
@@ -5818,7 +5761,7 @@ function useOutlet(context) {
5818
5761
  function useParams() {
5819
5762
  let { matches } = reactExports.useContext(RouteContext);
5820
5763
  let routeMatch = matches[matches.length - 1];
5821
- return (routeMatch == null ? void 0 : routeMatch.params) ?? {};
5764
+ return routeMatch?.params ?? {};
5822
5765
  }
5823
5766
  function useResolvedPath(to, { relative } = {}) {
5824
5767
  let { matches } = reactExports.useContext(RouteContext);
@@ -6042,7 +5985,7 @@ function RenderedRoute({ routeContext, match, children }) {
6042
5985
  return /* @__PURE__ */ reactExports.createElement(RouteContext.Provider, { value: routeContext }, children);
6043
5986
  }
6044
5987
  function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
6045
- let dataRouterState = dataRouterOpts == null ? void 0 : dataRouterOpts.state;
5988
+ let dataRouterState = dataRouterOpts?.state;
6046
5989
  if (matches == null) {
6047
5990
  if (!dataRouterState) {
6048
5991
  return null;
@@ -6056,10 +5999,10 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
6056
5999
  }
6057
6000
  }
6058
6001
  let renderedMatches = matches;
6059
- let errors = dataRouterState == null ? void 0 : dataRouterState.errors;
6002
+ let errors = dataRouterState?.errors;
6060
6003
  if (errors != null) {
6061
6004
  let errorIndex = renderedMatches.findIndex(
6062
- (m) => m.route.id && (errors == null ? void 0 : errors[m.route.id]) !== void 0
6005
+ (m) => m.route.id && errors?.[m.route.id] !== void 0
6063
6006
  );
6064
6007
  invariant(
6065
6008
  errorIndex >= 0,
@@ -6098,12 +6041,11 @@ function _renderMatches(matches, parentMatches = [], dataRouterOpts) {
6098
6041
  }
6099
6042
  }
6100
6043
  }
6101
- let onErrorHandler = dataRouterOpts == null ? void 0 : dataRouterOpts.onError;
6044
+ let onErrorHandler = dataRouterOpts?.onError;
6102
6045
  let onError = dataRouterState && onErrorHandler ? (error, errorInfo) => {
6103
- var _a, _b;
6104
6046
  onErrorHandler(error, {
6105
6047
  location: dataRouterState.location,
6106
- params: ((_b = (_a = dataRouterState.matches) == null ? void 0 : _a[0]) == null ? void 0 : _b.params) ?? {},
6048
+ params: dataRouterState.matches?.[0]?.params ?? {},
6107
6049
  pattern: getRoutePattern(dataRouterState.matches),
6108
6050
  errorInfo
6109
6051
  });
@@ -6251,7 +6193,6 @@ function useActionData() {
6251
6193
  return state.actionData ? state.actionData[routeId] : void 0;
6252
6194
  }
6253
6195
  function useRouteError() {
6254
- var _a;
6255
6196
  let error = reactExports.useContext(RouteErrorContext);
6256
6197
  let state = useDataRouterState(
6257
6198
  "useRouteError"
@@ -6264,7 +6205,7 @@ function useRouteError() {
6264
6205
  if (error !== void 0) {
6265
6206
  return error;
6266
6207
  }
6267
- return (_a = state.errors) == null ? void 0 : _a[routeId];
6208
+ return state.errors?.[routeId];
6268
6209
  }
6269
6210
  function useNavigateStable() {
6270
6211
  let { router } = useDataRouterContext(
@@ -6412,14 +6353,11 @@ function RouterProvider({
6412
6353
  (newState, { deletedFetchers, newErrors, flushSync, viewTransitionOpts }) => {
6413
6354
  if (newErrors && onError) {
6414
6355
  Object.values(newErrors).forEach(
6415
- (error) => {
6416
- var _a;
6417
- return onError(error, {
6418
- location: newState.location,
6419
- params: ((_a = newState.matches[0]) == null ? void 0 : _a.params) ?? {},
6420
- pattern: getRoutePattern(newState.matches)
6421
- });
6422
- }
6356
+ (error) => onError(error, {
6357
+ location: newState.location,
6358
+ params: newState.matches[0]?.params ?? {},
6359
+ pattern: getRoutePattern(newState.matches)
6360
+ })
6423
6361
  );
6424
6362
  }
6425
6363
  newState.fetchers.forEach((fetcher, key) => {
@@ -6455,7 +6393,7 @@ function RouterProvider({
6455
6393
  if (reactDomFlushSyncImpl && flushSync) {
6456
6394
  reactDomFlushSyncImpl(() => {
6457
6395
  if (transition) {
6458
- renderDfd == null ? void 0 : renderDfd.resolve();
6396
+ renderDfd?.resolve();
6459
6397
  transition.skipTransition();
6460
6398
  }
6461
6399
  setVtContext({
@@ -6480,7 +6418,7 @@ function RouterProvider({
6480
6418
  return;
6481
6419
  }
6482
6420
  if (transition) {
6483
- renderDfd == null ? void 0 : renderDfd.resolve();
6421
+ renderDfd?.resolve();
6484
6422
  transition.skipTransition();
6485
6423
  setInterruption({
6486
6424
  state: newState,
@@ -6570,12 +6508,12 @@ function RouterProvider({
6570
6508
  go: (n) => router.navigate(n),
6571
6509
  push: (to, state2, opts) => router.navigate(to, {
6572
6510
  state: state2,
6573
- preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
6511
+ preventScrollReset: opts?.preventScrollReset
6574
6512
  }),
6575
6513
  replace: (to, state2, opts) => router.navigate(to, {
6576
6514
  replace: true,
6577
6515
  state: state2,
6578
- preventScrollReset: opts == null ? void 0 : opts.preventScrollReset
6516
+ preventScrollReset: opts?.preventScrollReset
6579
6517
  })
6580
6518
  };
6581
6519
  }, [router]);
@@ -7270,7 +7208,7 @@ function invariant2(value, message) {
7270
7208
  throw new Error(message);
7271
7209
  }
7272
7210
  }
7273
- var SingleFetchRedirectSymbol = Symbol("SingleFetchRedirect");
7211
+ var SingleFetchRedirectSymbol = /* @__PURE__ */ Symbol("SingleFetchRedirect");
7274
7212
  var SingleFetchNoResultError = class extends Error {
7275
7213
  };
7276
7214
  var SINGLE_FETCH_REDIRECT_STATUS = 202;
@@ -7474,7 +7412,6 @@ async function singleFetchLoaderNavigationStrategy(args, router, getRouteInfo, f
7474
7412
  return results;
7475
7413
  }
7476
7414
  async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams, results) {
7477
- var _a;
7478
7415
  try {
7479
7416
  let middlewareError;
7480
7417
  let fetchedData = await singleFetchPromise;
@@ -7484,7 +7421,7 @@ async function bubbleMiddlewareErrors(singleFetchPromise, matches, routesParams,
7484
7421
  let routeResult = fetchedData.routes[match.route.id];
7485
7422
  if ("error" in routeResult) {
7486
7423
  middlewareError = routeResult.error;
7487
- if (((_a = results[match.route.id]) == null ? void 0 : _a.result) == null) {
7424
+ if (results[match.route.id]?.result == null) {
7488
7425
  results[match.route.id] = {
7489
7426
  type: "error",
7490
7427
  result: middlewareError
@@ -7607,7 +7544,7 @@ async function fetchAndDecodeViaTurboStream(args, basename, trailingSlashAware,
7607
7544
  }
7608
7545
  } else {
7609
7546
  let typed = decoded.value;
7610
- let routeId = targetRoutes == null ? void 0 : targetRoutes[0];
7547
+ let routeId = targetRoutes?.[0];
7611
7548
  invariant2(routeId, "No routeId found for single fetch call decoding");
7612
7549
  if ("redirect" in typed) {
7613
7550
  data2 = { redirect: typed };
@@ -7739,12 +7676,11 @@ async function loadRouteModule(route, routeModulesCache) {
7739
7676
  }
7740
7677
  function getKeyedLinksForMatches(matches, routeModules, manifest) {
7741
7678
  let descriptors = matches.map((match) => {
7742
- var _a;
7743
7679
  let module = routeModules[match.route.id];
7744
7680
  let route = manifest.routes[match.route.id];
7745
7681
  return [
7746
7682
  route && route.css ? route.css.map((href) => ({ rel: "stylesheet", href })) : [],
7747
- ((_a = module == null ? void 0 : module.links) == null ? void 0 : _a.call(module)) || []
7683
+ module?.links?.() || []
7748
7684
  ];
7749
7685
  }).flat(2);
7750
7686
  let preloads = getModuleLinkHrefs(matches, manifest);
@@ -7841,12 +7777,11 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
7841
7777
  return match.route.id !== currentMatches[index].route.id;
7842
7778
  };
7843
7779
  let matchPathChanged = (match, index) => {
7844
- var _a;
7845
7780
  return (
7846
7781
  // param change, /users/123 -> /users/456
7847
7782
  currentMatches[index].pathname !== match.pathname || // splat param changed, which is not present in match.path
7848
7783
  // e.g. /files/images/avatar.jpg -> files/finances.xls
7849
- ((_a = currentMatches[index].route.path) == null ? void 0 : _a.endsWith("*")) && currentMatches[index].params["*"] !== match.params["*"]
7784
+ currentMatches[index].route.path?.endsWith("*") && currentMatches[index].params["*"] !== match.params["*"]
7850
7785
  );
7851
7786
  };
7852
7787
  if (mode === "assets") {
@@ -7856,7 +7791,6 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
7856
7791
  }
7857
7792
  if (mode === "data") {
7858
7793
  return nextMatches.filter((match, index) => {
7859
- var _a;
7860
7794
  let manifestRoute = manifest.routes[match.route.id];
7861
7795
  if (!manifestRoute || !manifestRoute.hasLoader) {
7862
7796
  return false;
@@ -7870,7 +7804,7 @@ function getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, loca
7870
7804
  location.pathname + location.search + location.hash,
7871
7805
  window.origin
7872
7806
  ),
7873
- currentParams: ((_a = currentMatches[0]) == null ? void 0 : _a.params) || {},
7807
+ currentParams: currentMatches[0]?.params || {},
7874
7808
  nextUrl: new URL(page, window.origin),
7875
7809
  nextParams: match.params,
7876
7810
  defaultShouldRevalidate: true
@@ -8022,7 +7956,6 @@ function noActionDefinedError(type, routeId) {
8022
7956
  }
8023
7957
  function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSpaMode, parentId = "", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {
8024
7958
  return (routesByParentId[parentId] || []).map((route) => {
8025
- var _a, _b, _c;
8026
7959
  let routeModule = routeModulesCache[route.id];
8027
7960
  function fetchServerHandler(singleFetch) {
8028
7961
  invariant2(
@@ -8085,10 +8018,10 @@ function createClientRoutes(manifest, routeModulesCache, initialState, ssr, isSp
8085
8018
  )
8086
8019
  });
8087
8020
  let hasInitialData = initialState && initialState.loaderData && route.id in initialState.loaderData;
8088
- let initialData = hasInitialData ? (_a = initialState == null ? void 0 : initialState.loaderData) == null ? void 0 : _a[route.id] : void 0;
8021
+ let initialData = hasInitialData ? initialState?.loaderData?.[route.id] : void 0;
8089
8022
  let hasInitialError = initialState && initialState.errors && route.id in initialState.errors;
8090
- let initialError = hasInitialError ? (_b = initialState == null ? void 0 : initialState.errors) == null ? void 0 : _b[route.id] : void 0;
8091
- let isHydrationRequest = needsRevalidation == null && (((_c = routeModule.clientLoader) == null ? void 0 : _c.hydrate) === true || !route.hasLoader);
8023
+ let initialError = hasInitialError ? initialState?.errors?.[route.id] : void 0;
8024
+ let isHydrationRequest = needsRevalidation == null && (routeModule.clientLoader?.hydrate === true || !route.hasLoader);
8092
8025
  dataRoute.loader = async ({ request, params, context, pattern, url }, singleFetch) => {
8093
8026
  let _isHydrationRequest = isHydrationRequest;
8094
8027
  isHydrationRequest = false;
@@ -8401,9 +8334,8 @@ function getPatchRoutesOnNavigationFunction(getRouter, manifest, routeModules, s
8401
8334
  }
8402
8335
  function useFogOFWarDiscovery(router, manifest, routeModules, ssr, routeDiscovery, isSpaMode) {
8403
8336
  reactExports.useEffect(() => {
8404
- var _a, _b;
8405
8337
  if (!isFogOfWarEnabled(routeDiscovery, ssr) || // @ts-expect-error - TS doesn't know about this yet
8406
- ((_b = (_a = window.navigator) == null ? void 0 : _a.connection) == null ? void 0 : _b.saveData) === true) {
8338
+ window.navigator?.connection?.saveData === true) {
8407
8339
  return;
8408
8340
  }
8409
8341
  function registerElement(el) {
@@ -8510,7 +8442,7 @@ async function fetchAndApplyManifestPatches(paths, errorReloadPath, manifest, ro
8510
8442
  }
8511
8443
  serverPatches = await res.json();
8512
8444
  } catch (e) {
8513
- if (signal == null ? void 0 : signal.aborted) return;
8445
+ if (signal?.aborted) return;
8514
8446
  throw e;
8515
8447
  }
8516
8448
  let knownRoutes = new Set(Object.keys(manifest.routes));
@@ -8820,12 +8752,11 @@ function PrefetchPageLinksImpl({
8820
8752
  let routesParams = /* @__PURE__ */ new Set();
8821
8753
  let foundOptOutRoute = false;
8822
8754
  nextMatches.forEach((m) => {
8823
- var _a;
8824
8755
  let manifestRoute = manifest.routes[m.route.id];
8825
8756
  if (!manifestRoute || !manifestRoute.hasLoader) {
8826
8757
  return;
8827
8758
  }
8828
- if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && ((_a = routeModules[m.route.id]) == null ? void 0 : _a.shouldRevalidate)) {
8759
+ if (!newMatchesForData.some((m2) => m2.route.id === m.route.id) && m.route.id in loaderData && routeModules[m.route.id]?.shouldRevalidate) {
8829
8760
  foundOptOutRoute = true;
8830
8761
  } else if (manifestRoute.hasClientLoader) {
8831
8762
  foundOptOutRoute = true;
@@ -8913,7 +8844,7 @@ function Meta() {
8913
8844
  error
8914
8845
  };
8915
8846
  matches[i] = match;
8916
- if (routeModule == null ? void 0 : routeModule.meta) {
8847
+ if (routeModule?.meta) {
8917
8848
  routeMeta = typeof routeModule.meta === "function" ? routeModule.meta({
8918
8849
  data: data2,
8919
8850
  loaderData: data2,
@@ -9011,13 +8942,12 @@ function Scripts(scriptProps) {
9011
8942
  setIsHydrated();
9012
8943
  }, []);
9013
8944
  let initialScripts = reactExports.useMemo(() => {
9014
- var _a;
9015
8945
  if (isRSCRouterContext) {
9016
8946
  return null;
9017
8947
  }
9018
8948
  let streamScript = "window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());";
9019
8949
  let contextScript = staticContext ? `window.__reactRouterContext = ${serverHandoffString};${streamScript}` : " ";
9020
- let routeModulesScript = !isStatic ? " " : `${((_a = manifest.hmr) == null ? void 0 : _a.runtime) ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
8950
+ let routeModulesScript = !isStatic ? " " : `${manifest.hmr?.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : ""}${!enableFogOfWar ? `import ${JSON.stringify(manifest.url)}` : ""};
9021
8951
  ${matches.map((match, routeIndex) => {
9022
8952
  let routeVarName = `route${routeIndex}`;
9023
8953
  let manifestEntry = manifest.routes[match.route.id];
@@ -9250,9 +9180,8 @@ function BoundaryShell({
9250
9180
  isOutsideRemixApp,
9251
9181
  children
9252
9182
  }) {
9253
- var _a;
9254
9183
  let { routeModules } = useFrameworkContext();
9255
- if (((_a = routeModules.root) == null ? void 0 : _a.Layout) && !isOutsideRemixApp) {
9184
+ if (routeModules.root?.Layout && !isOutsideRemixApp) {
9256
9185
  return children;
9257
9186
  }
9258
9187
  return /* @__PURE__ */ reactExports.createElement("html", { lang: "en" }, /* @__PURE__ */ reactExports.createElement("head", null, /* @__PURE__ */ reactExports.createElement("meta", { charSet: "utf-8" }), /* @__PURE__ */ reactExports.createElement(
@@ -9442,7 +9371,7 @@ var Form = reactExports.forwardRef(
9442
9371
  if (event.defaultPrevented) return;
9443
9372
  event.preventDefault();
9444
9373
  let submitter = event.nativeEvent.submitter;
9445
- let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
9374
+ let submitMethod = submitter?.getAttribute("formmethod") || method;
9446
9375
  let doSubmit = () => submit(submitter || event.currentTarget, {
9447
9376
  fetcherKey,
9448
9377
  method: submitMethod,
@@ -9518,7 +9447,7 @@ function ScrollRestoration({
9518
9447
  sessionStorage.removeItem(storageKey2);
9519
9448
  }
9520
9449
  }).toString();
9521
- if (props.nonce == null && (remixContext == null ? void 0 : remixContext.nonce)) {
9450
+ if (props.nonce == null && remixContext?.nonce) {
9522
9451
  props.nonce = remixContext.nonce;
9523
9452
  }
9524
9453
  return /* @__PURE__ */ reactExports.createElement(
@@ -9784,7 +9713,7 @@ function useScrollRestoration({
9784
9713
  }
9785
9714
  }, [storageKey]);
9786
9715
  reactExports.useLayoutEffect(() => {
9787
- let disableScrollRestoration = router == null ? void 0 : router.enableScrollRestoration(
9716
+ let disableScrollRestoration = router?.enableScrollRestoration(
9788
9717
  savedScrollPositions,
9789
9718
  () => window.scrollY,
9790
9719
  getKey ? (location2, matches2) => getScrollRestorationKey(location2, matches2, basename, getKey) : void 0