Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
1 line
No EOL
43 KiB
Text
1 line
No EOL
43 KiB
Text
{"version":3,"sources":["../../../src/client/components/layout-router.tsx"],"sourcesContent":["'use client'\n\nimport type {\n CacheNode,\n LazyCacheNode,\n} from '../../shared/lib/app-router-types'\nimport type { LoadingModuleData } from '../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n FlightSegmentPath,\n Segment,\n} from '../../shared/lib/app-router-types'\nimport type { ErrorComponent } from './error-boundary'\nimport {\n ACTION_SERVER_PATCH,\n type FocusAndScrollRef,\n} from './router-reducer/router-reducer-types'\n\nimport React, {\n Activity,\n useContext,\n use,\n startTransition,\n Suspense,\n useDeferredValue,\n type JSX,\n type ActivityProps,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport {\n LayoutRouterContext,\n GlobalLayoutRouterContext,\n TemplateContext,\n} from '../../shared/lib/app-router-context.shared-runtime'\nimport { fetchServerResponse } from './router-reducer/fetch-server-response'\nimport { unresolvedThenable } from './unresolved-thenable'\nimport { ErrorBoundary } from './error-boundary'\nimport { matchSegment } from './match-segments'\nimport { disableSmoothScrollDuringRouteTransition } from '../../shared/lib/router/utils/disable-smooth-scroll'\nimport { RedirectBoundary } from './redirect-boundary'\nimport { HTTPAccessFallbackBoundary } from './http-access-fallback/error-boundary'\nimport { createRouterCacheKey } from './router-reducer/create-router-cache-key'\nimport { hasInterceptionRouteInCurrentTree } from './router-reducer/reducers/has-interception-route-in-current-tree'\nimport { dispatchAppRouterAction } from './use-action-queue'\nimport { useRouterBFCache, type RouterBFCacheEntry } from './bfcache'\nimport { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'\nimport {\n NavigationPromisesContext,\n type NavigationPromises,\n} from '../../shared/lib/hooks-client-context.shared-runtime'\nimport { getParamValueFromCacheKey } from '../route-params'\nimport type { Params } from '../../server/request/params'\n\n/**\n * Add refetch marker to router state at the point of the current layout segment.\n * This ensures the response returned is not further down than the current layout segment.\n */\nfunction walkAddRefetch(\n segmentPathToWalk: FlightSegmentPath | undefined,\n treeToRecreate: FlightRouterState\n): FlightRouterState {\n if (segmentPathToWalk) {\n const [segment, parallelRouteKey] = segmentPathToWalk\n const isLast = segmentPathToWalk.length === 2\n\n if (matchSegment(treeToRecreate[0], segment)) {\n if (treeToRecreate[1].hasOwnProperty(parallelRouteKey)) {\n if (isLast) {\n const subTree = walkAddRefetch(\n undefined,\n treeToRecreate[1][parallelRouteKey]\n )\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: [\n subTree[0],\n subTree[1],\n subTree[2],\n 'refetch',\n ],\n },\n ]\n }\n\n return [\n treeToRecreate[0],\n {\n ...treeToRecreate[1],\n [parallelRouteKey]: walkAddRefetch(\n segmentPathToWalk.slice(2),\n treeToRecreate[1][parallelRouteKey]\n ),\n },\n ]\n }\n }\n }\n\n return treeToRecreate\n}\n\nconst __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = (\n ReactDOM as any\n).__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE\n\n// TODO-APP: Replace with new React API for finding dom nodes without a `ref` when available\n/**\n * Wraps ReactDOM.findDOMNode with additional logic to hide React Strict Mode warning\n */\nfunction findDOMNode(\n instance: React.ReactInstance | null | undefined\n): Element | Text | null {\n // Tree-shake for server bundle\n if (typeof window === 'undefined') return null\n\n // __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode is null during module init.\n // We need to lazily reference it.\n const internal_reactDOMfindDOMNode =\n __DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE.findDOMNode\n return internal_reactDOMfindDOMNode(instance)\n}\n\nconst rectProperties = [\n 'bottom',\n 'height',\n 'left',\n 'right',\n 'top',\n 'width',\n 'x',\n 'y',\n] as const\n/**\n * Check if a HTMLElement is hidden or fixed/sticky position\n */\nfunction shouldSkipElement(element: HTMLElement) {\n // we ignore fixed or sticky positioned elements since they'll likely pass the \"in-viewport\" check\n // and will result in a situation we bail on scroll because of something like a fixed nav,\n // even though the actual page content is offscreen\n if (['sticky', 'fixed'].includes(getComputedStyle(element).position)) {\n return true\n }\n\n // Uses `getBoundingClientRect` to check if the element is hidden instead of `offsetParent`\n // because `offsetParent` doesn't consider document/body\n const rect = element.getBoundingClientRect()\n return rectProperties.every((item) => rect[item] === 0)\n}\n\n/**\n * Check if the top corner of the HTMLElement is in the viewport.\n */\nfunction topOfElementInViewport(element: HTMLElement, viewportHeight: number) {\n const rect = element.getBoundingClientRect()\n return rect.top >= 0 && rect.top <= viewportHeight\n}\n\n/**\n * Find the DOM node for a hash fragment.\n * If `top` the page has to scroll to the top of the page. This mirrors the browser's behavior.\n * If the hash fragment is an id, the page has to scroll to the element with that id.\n * If the hash fragment is a name, the page has to scroll to the first element with that name.\n */\nfunction getHashFragmentDomNode(hashFragment: string) {\n // If the hash fragment is `top` the page has to scroll to the top of the page.\n if (hashFragment === 'top') {\n return document.body\n }\n\n // If the hash fragment is an id, the page has to scroll to the element with that id.\n return (\n document.getElementById(hashFragment) ??\n // If the hash fragment is a name, the page has to scroll to the first element with that name.\n document.getElementsByName(hashFragment)[0]\n )\n}\ninterface ScrollAndFocusHandlerProps {\n focusAndScrollRef: FocusAndScrollRef\n children: React.ReactNode\n segmentPath: FlightSegmentPath\n}\nclass InnerScrollAndFocusHandler extends React.Component<ScrollAndFocusHandlerProps> {\n handlePotentialScroll = () => {\n // Handle scroll and focus, it's only applied once in the first useEffect that triggers that changed.\n const { focusAndScrollRef, segmentPath } = this.props\n\n if (focusAndScrollRef.apply) {\n // segmentPaths is an array of segment paths that should be scrolled to\n // if the current segment path is not in the array, the scroll is not applied\n // unless the array is empty, in which case the scroll is always applied\n if (\n focusAndScrollRef.segmentPaths.length !== 0 &&\n !focusAndScrollRef.segmentPaths.some((scrollRefSegmentPath) =>\n segmentPath.every((segment, index) =>\n matchSegment(segment, scrollRefSegmentPath[index])\n )\n )\n ) {\n return\n }\n\n let domNode:\n | ReturnType<typeof getHashFragmentDomNode>\n | ReturnType<typeof findDOMNode> = null\n const hashFragment = focusAndScrollRef.hashFragment\n\n if (hashFragment) {\n domNode = getHashFragmentDomNode(hashFragment)\n }\n\n // `findDOMNode` is tricky because it returns just the first child if the component is a fragment.\n // This already caused a bug where the first child was a <link/> in head.\n if (!domNode) {\n domNode = findDOMNode(this)\n }\n\n // If there is no DOM node this layout-router level is skipped. It'll be handled higher-up in the tree.\n if (!(domNode instanceof Element)) {\n return\n }\n\n // Verify if the element is a HTMLElement and if we want to consider it for scroll behavior.\n // If the element is skipped, try to select the next sibling and try again.\n while (!(domNode instanceof HTMLElement) || shouldSkipElement(domNode)) {\n if (process.env.NODE_ENV !== 'production') {\n if (domNode.parentElement?.localName === 'head') {\n // TODO: We enter this state when metadata was rendered as part of the page or via Next.js.\n // This is always a bug in Next.js and caused by React hoisting metadata.\n // We need to replace `findDOMNode` in favor of Fragment Refs (when available) so that we can skip over metadata.\n }\n }\n\n // No siblings found that match the criteria are found, so handle scroll higher up in the tree instead.\n if (domNode.nextElementSibling === null) {\n return\n }\n domNode = domNode.nextElementSibling\n }\n\n // State is mutated to ensure that the focus and scroll is applied only once.\n focusAndScrollRef.apply = false\n focusAndScrollRef.hashFragment = null\n focusAndScrollRef.segmentPaths = []\n\n disableSmoothScrollDuringRouteTransition(\n () => {\n // In case of hash scroll, we only need to scroll the element into view\n if (hashFragment) {\n ;(domNode as HTMLElement).scrollIntoView()\n\n return\n }\n // Store the current viewport height because reading `clientHeight` causes a reflow,\n // and it won't change during this function.\n const htmlElement = document.documentElement\n const viewportHeight = htmlElement.clientHeight\n\n // If the element's top edge is already in the viewport, exit early.\n if (topOfElementInViewport(domNode as HTMLElement, viewportHeight)) {\n return\n }\n\n // Otherwise, try scrolling go the top of the document to be backward compatible with pages\n // scrollIntoView() called on `<html/>` element scrolls horizontally on chrome and firefox (that shouldn't happen)\n // We could use it to scroll horizontally following RTL but that also seems to be broken - it will always scroll left\n // scrollLeft = 0 also seems to ignore RTL and manually checking for RTL is too much hassle so we will scroll just vertically\n htmlElement.scrollTop = 0\n\n // Scroll to domNode if domNode is not in viewport when scrolled to top of document\n if (!topOfElementInViewport(domNode as HTMLElement, viewportHeight)) {\n // Scroll into view doesn't scroll horizontally by default when not needed\n ;(domNode as HTMLElement).scrollIntoView()\n }\n },\n {\n // We will force layout by querying domNode position\n dontForceLayout: true,\n onlyHashChange: focusAndScrollRef.onlyHashChange,\n }\n )\n\n // Mutate after scrolling so that it can be read by `disableSmoothScrollDuringRouteTransition`\n focusAndScrollRef.onlyHashChange = false\n\n // Set focus on the element\n domNode.focus()\n }\n }\n\n componentDidMount() {\n this.handlePotentialScroll()\n }\n\n componentDidUpdate() {\n // Because this property is overwritten in handlePotentialScroll it's fine to always run it when true as it'll be set to false for subsequent renders.\n if (this.props.focusAndScrollRef.apply) {\n this.handlePotentialScroll()\n }\n }\n\n render() {\n return this.props.children\n }\n}\n\nfunction ScrollAndFocusHandler({\n segmentPath,\n children,\n}: {\n segmentPath: FlightSegmentPath\n children: React.ReactNode\n}) {\n const context = useContext(GlobalLayoutRouterContext)\n if (!context) {\n throw new Error('invariant global layout router not mounted')\n }\n\n return (\n <InnerScrollAndFocusHandler\n segmentPath={segmentPath}\n focusAndScrollRef={context.focusAndScrollRef}\n >\n {children}\n </InnerScrollAndFocusHandler>\n )\n}\n\n/**\n * InnerLayoutRouter handles rendering the provided segment based on the cache.\n */\nfunction InnerLayoutRouter({\n tree,\n segmentPath,\n debugNameContext,\n cacheNode,\n params,\n url,\n isActive,\n}: {\n tree: FlightRouterState\n segmentPath: FlightSegmentPath\n debugNameContext: string\n cacheNode: CacheNode\n params: Params\n url: string\n isActive: boolean\n}) {\n const context = useContext(GlobalLayoutRouterContext)\n const parentNavPromises = useContext(NavigationPromisesContext)\n\n if (!context) {\n throw new Error('invariant global layout router not mounted')\n }\n\n const { tree: fullTree } = context\n\n // `rsc` represents the renderable node for this segment.\n\n // If this segment has a `prefetchRsc`, it's the statically prefetched data.\n // We should use that on initial render instead of `rsc`. Then we'll switch\n // to `rsc` when the dynamic response streams in.\n //\n // If no prefetch data is available, then we go straight to rendering `rsc`.\n const resolvedPrefetchRsc =\n cacheNode.prefetchRsc !== null ? cacheNode.prefetchRsc : cacheNode.rsc\n\n // We use `useDeferredValue` to handle switching between the prefetched and\n // final values. The second argument is returned on initial render, then it\n // re-renders with the first argument.\n const rsc: any = useDeferredValue(cacheNode.rsc, resolvedPrefetchRsc)\n\n // `rsc` is either a React node or a promise for a React node, except we\n // special case `null` to represent that this segment's data is missing. If\n // it's a promise, we need to unwrap it so we can determine whether or not the\n // data is missing.\n const resolvedRsc: React.ReactNode =\n typeof rsc === 'object' && rsc !== null && typeof rsc.then === 'function'\n ? use(rsc)\n : rsc\n\n if (!resolvedRsc) {\n // The data for this segment is not available, and there's no pending\n // navigation that will be able to fulfill it. We need to fetch more from\n // the server and patch the cache.\n\n // Only fetch data for the active segment. Inactive segments (rendered\n // offscreen for bfcache) should not trigger fetches.\n if (isActive) {\n // Check if there's already a pending request.\n let lazyData = cacheNode.lazyData\n if (lazyData === null) {\n /**\n * Router state with refetch marker added\n */\n // TODO-APP: remove ''\n const refetchTree = walkAddRefetch(['', ...segmentPath], fullTree)\n const includeNextUrl = hasInterceptionRouteInCurrentTree(fullTree)\n const navigatedAt = Date.now()\n cacheNode.lazyData = lazyData = fetchServerResponse(\n new URL(url, location.origin),\n {\n flightRouterState: refetchTree,\n nextUrl: includeNextUrl\n ? // We always send the last next-url, not the current when\n // performing a dynamic request. This is because we update\n // the next-url after a navigation, but we want the same\n // interception route to be matched that used the last\n // next-url.\n context.previousNextUrl || context.nextUrl\n : null,\n }\n ).then((serverResponse) => {\n startTransition(() => {\n dispatchAppRouterAction({\n type: ACTION_SERVER_PATCH,\n previousTree: fullTree,\n serverResponse,\n navigatedAt,\n })\n })\n\n return serverResponse\n })\n\n // Suspend while waiting for lazyData to resolve\n use(lazyData)\n }\n }\n // Suspend infinitely as `changeByServerResponse` will cause a different part of the tree to be rendered.\n // A falsey `resolvedRsc` indicates missing data -- we should not commit that branch, and we need to wait for the data to arrive.\n use(unresolvedThenable) as never\n }\n\n // If we get to this point, then we know we have something we can render.\n let content = resolvedRsc\n\n // In dev, we create a NavigationPromisesContext containing the instrumented promises that provide\n // `useSelectedLayoutSegment` and `useSelectedLayoutSegments`.\n // Promises are cached outside of render to survive suspense retries.\n let navigationPromises: NavigationPromises | null = null\n if (process.env.NODE_ENV !== 'production') {\n const { createNestedLayoutNavigationPromises } =\n require('./navigation-devtools') as typeof import('./navigation-devtools')\n\n navigationPromises = createNestedLayoutNavigationPromises(\n tree,\n parentNavPromises\n )\n }\n\n if (navigationPromises) {\n content = (\n <NavigationPromisesContext.Provider value={navigationPromises}>\n {resolvedRsc}\n </NavigationPromisesContext.Provider>\n )\n }\n\n const subtree = (\n // The layout router context narrows down tree and childNodes at each level.\n <LayoutRouterContext.Provider\n value={{\n parentTree: tree,\n parentCacheNode: cacheNode,\n parentSegmentPath: segmentPath,\n parentParams: params,\n debugNameContext: debugNameContext,\n\n // TODO-APP: overriding of url for parallel routes\n url: url,\n isActive: isActive,\n }}\n >\n {content}\n </LayoutRouterContext.Provider>\n )\n // Ensure root layout is not wrapped in a div as the root layout renders `<html>`\n return subtree\n}\n\n/**\n * Renders suspense boundary with the provided \"loading\" property as the fallback.\n * If no loading property is provided it renders the children without a suspense boundary.\n */\nfunction LoadingBoundary({\n name,\n loading,\n children,\n}: {\n name: ActivityProps['name']\n loading: LoadingModuleData | Promise<LoadingModuleData>\n children: React.ReactNode\n}): JSX.Element {\n // If loading is a promise, unwrap it. This happens in cases where we haven't\n // yet received the loading data from the server — which includes whether or\n // not this layout has a loading component at all.\n //\n // It's OK to suspend here instead of inside the fallback because this\n // promise will resolve simultaneously with the data for the segment itself.\n // So it will never suspend for longer than it would have if we didn't use\n // a Suspense fallback at all.\n let loadingModuleData\n if (\n typeof loading === 'object' &&\n loading !== null &&\n typeof (loading as any).then === 'function'\n ) {\n const promiseForLoading = loading as Promise<LoadingModuleData>\n loadingModuleData = use(promiseForLoading)\n } else {\n loadingModuleData = loading as LoadingModuleData\n }\n\n if (loadingModuleData) {\n const loadingRsc = loadingModuleData[0]\n const loadingStyles = loadingModuleData[1]\n const loadingScripts = loadingModuleData[2]\n return (\n <Suspense\n name={name}\n fallback={\n <>\n {loadingStyles}\n {loadingScripts}\n {loadingRsc}\n </>\n }\n >\n {children}\n </Suspense>\n )\n }\n\n return <>{children}</>\n}\n\n/**\n * OuterLayoutRouter handles the current segment as well as <Offscreen> rendering of other segments.\n * It can be rendered next to each other with a different `parallelRouterKey`, allowing for Parallel routes.\n */\nexport default function OuterLayoutRouter({\n parallelRouterKey,\n error,\n errorStyles,\n errorScripts,\n templateStyles,\n templateScripts,\n template,\n notFound,\n forbidden,\n unauthorized,\n segmentViewBoundaries,\n}: {\n parallelRouterKey: string\n error: ErrorComponent | undefined\n errorStyles: React.ReactNode | undefined\n errorScripts: React.ReactNode | undefined\n templateStyles: React.ReactNode | undefined\n templateScripts: React.ReactNode | undefined\n template: React.ReactNode\n notFound: React.ReactNode | undefined\n forbidden: React.ReactNode | undefined\n unauthorized: React.ReactNode | undefined\n segmentViewBoundaries?: React.ReactNode\n}) {\n const context = useContext(LayoutRouterContext)\n if (!context) {\n throw new Error('invariant expected layout router to be mounted')\n }\n\n const {\n parentTree,\n parentCacheNode,\n parentSegmentPath,\n parentParams,\n url,\n isActive,\n debugNameContext,\n } = context\n\n // Get the CacheNode for this segment by reading it from the parent segment's\n // child map.\n const parentParallelRoutes = parentCacheNode.parallelRoutes\n let segmentMap = parentParallelRoutes.get(parallelRouterKey)\n // If the parallel router cache node does not exist yet, create it.\n // This writes to the cache when there is no item in the cache yet. It never *overwrites* existing cache items which is why it's safe in concurrent mode.\n if (!segmentMap) {\n segmentMap = new Map()\n parentParallelRoutes.set(parallelRouterKey, segmentMap)\n }\n const parentTreeSegment = parentTree[0]\n const segmentPath =\n parentSegmentPath === null\n ? // TODO: The root segment value is currently omitted from the segment\n // path. This has led to a bunch of special cases scattered throughout\n // the code. We should clean this up.\n [parallelRouterKey]\n : parentSegmentPath.concat([parentTreeSegment, parallelRouterKey])\n\n // The \"state\" key of a segment is the one passed to React — it represents the\n // identity of the UI tree. Whenever the state key changes, the tree is\n // recreated and the state is reset. In the App Router model, search params do\n // not cause state to be lost, so two segments with the same segment path but\n // different search params should have the same state key.\n //\n // The \"cache\" key of a segment, however, *does* include the search params, if\n // it's possible that the segment accessed the search params on the server.\n // (This only applies to page segments; layout segments cannot access search\n // params on the server.)\n const activeTree = parentTree[1][parallelRouterKey]\n const activeSegment = activeTree[0]\n const activeStateKey = createRouterCacheKey(activeSegment, true) // no search params\n\n // At each level of the route tree, not only do we render the currently\n // active segment — we also render the last N segments that were active at\n // this level inside a hidden <Activity> boundary, to preserve their state\n // if or when the user navigates to them again.\n //\n // bfcacheEntry is a linked list of FlightRouterStates.\n let bfcacheEntry: RouterBFCacheEntry | null = useRouterBFCache(\n activeTree,\n activeStateKey\n )\n let children: Array<React.ReactNode> = []\n do {\n const tree = bfcacheEntry.tree\n const stateKey = bfcacheEntry.stateKey\n const segment = tree[0]\n const cacheKey = createRouterCacheKey(segment)\n\n // Read segment path from the parallel router cache node.\n let cacheNode = segmentMap.get(cacheKey)\n if (cacheNode === undefined) {\n // When data is not available during rendering client-side we need to fetch\n // it from the server.\n const newLazyCacheNode: LazyCacheNode = {\n lazyData: null,\n rsc: null,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(),\n loading: null,\n navigatedAt: -1,\n }\n\n // Flight data fetch kicked off during render and put into the cache.\n cacheNode = newLazyCacheNode\n segmentMap.set(cacheKey, newLazyCacheNode)\n }\n\n /*\n - Error boundary\n - Only renders error boundary if error component is provided.\n - Rendered for each segment to ensure they have their own error state.\n - When gracefully degrade for bots, skip rendering error boundary.\n - Loading boundary\n - Only renders suspense boundary if loading components is provided.\n - Rendered for each segment to ensure they have their own loading state.\n - Passed to the router during rendering to ensure it can be immediately rendered when suspending on a Flight fetch.\n */\n\n let segmentBoundaryTriggerNode: React.ReactNode = null\n let segmentViewStateNode: React.ReactNode = null\n if (process.env.NODE_ENV !== 'production') {\n const { SegmentBoundaryTriggerNode, SegmentViewStateNode } =\n require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')\n\n const pagePrefix = normalizeAppPath(url)\n segmentViewStateNode = (\n <SegmentViewStateNode key={pagePrefix} page={pagePrefix} />\n )\n\n segmentBoundaryTriggerNode = (\n <>\n <SegmentBoundaryTriggerNode />\n </>\n )\n }\n\n let params = parentParams\n if (Array.isArray(segment)) {\n // This segment contains a route param. Accumulate these as we traverse\n // down the router tree. The result represents the set of params that\n // the layout/page components are permitted to access below this point.\n const paramName = segment[0]\n const paramCacheKey = segment[1]\n const paramType = segment[2]\n const paramValue = getParamValueFromCacheKey(paramCacheKey, paramType)\n if (paramValue !== null) {\n params = {\n ...parentParams,\n [paramName]: paramValue,\n }\n }\n }\n\n const debugName = getBoundaryDebugNameFromSegment(segment)\n // `debugNameContext` represents the nearest non-\"virtual\" parent segment.\n // `getBoundaryDebugNameFromSegment` returns undefined for virtual segments.\n // So if `debugName` is undefined, the context is passed through unchanged.\n const childDebugNameContext = debugName ?? debugNameContext\n\n // In practical terms, clicking this name in the Suspense DevTools\n // should select the child slots of that layout.\n //\n // So the name we apply to the Activity boundary is actually based on\n // the nearest parent segments.\n //\n // We skip over \"virtual\" parents, i.e. ones inserted by Next.js that\n // don't correspond to application-defined code.\n const isVirtual = debugName === undefined\n const debugNameToDisplay = isVirtual ? undefined : debugNameContext\n\n // TODO: The loading module data for a segment is stored on the parent, then\n // applied to each of that parent segment's parallel route slots. In the\n // simple case where there's only one parallel route (the `children` slot),\n // this is no different from if the loading module data where stored on the\n // child directly. But I'm not sure this actually makes sense when there are\n // multiple parallel routes. It's not a huge issue because you always have\n // the option to define a narrower loading boundary for a particular slot. But\n // this sort of smells like an implementation accident to me.\n const loadingModuleData = parentCacheNode.loading\n let child = (\n <TemplateContext.Provider\n key={stateKey}\n value={\n <ScrollAndFocusHandler segmentPath={segmentPath}>\n <ErrorBoundary\n errorComponent={error}\n errorStyles={errorStyles}\n errorScripts={errorScripts}\n >\n <LoadingBoundary\n name={debugNameToDisplay}\n loading={loadingModuleData}\n >\n <HTTPAccessFallbackBoundary\n notFound={notFound}\n forbidden={forbidden}\n unauthorized={unauthorized}\n >\n <RedirectBoundary>\n <InnerLayoutRouter\n url={url}\n tree={tree}\n params={params}\n cacheNode={cacheNode}\n segmentPath={segmentPath}\n debugNameContext={childDebugNameContext}\n isActive={isActive && stateKey === activeStateKey}\n />\n {segmentBoundaryTriggerNode}\n </RedirectBoundary>\n </HTTPAccessFallbackBoundary>\n </LoadingBoundary>\n </ErrorBoundary>\n {segmentViewStateNode}\n </ScrollAndFocusHandler>\n }\n >\n {templateStyles}\n {templateScripts}\n {template}\n </TemplateContext.Provider>\n )\n\n if (process.env.NODE_ENV !== 'production') {\n const { SegmentStateProvider } =\n require('../../next-devtools/userspace/app/segment-explorer-node') as typeof import('../../next-devtools/userspace/app/segment-explorer-node')\n\n child = (\n <SegmentStateProvider key={stateKey}>\n {child}\n {segmentViewBoundaries}\n </SegmentStateProvider>\n )\n }\n\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n child = (\n <Activity\n name={debugNameToDisplay}\n key={stateKey}\n mode={stateKey === activeStateKey ? 'visible' : 'hidden'}\n >\n {child}\n </Activity>\n )\n }\n\n children.push(child)\n\n bfcacheEntry = bfcacheEntry.next\n } while (bfcacheEntry !== null)\n\n return children\n}\n\nfunction getBoundaryDebugNameFromSegment(segment: Segment): string | undefined {\n if (segment === '/') {\n // Reached the root\n return '/'\n }\n if (typeof segment === 'string') {\n if (isVirtualLayout(segment)) {\n return undefined\n } else {\n return segment + '/'\n }\n }\n const paramCacheKey = segment[1]\n return paramCacheKey + '/'\n}\n\nfunction isVirtualLayout(segment: string): boolean {\n return (\n // This is inserted by the loader. We should consider encoding these\n // in a more special way instead of checking the name, to distinguish them\n // from app-defined groups.\n segment === '(slot)'\n )\n}\n"],"names":["ACTION_SERVER_PATCH","React","Activity","useContext","use","startTransition","Suspense","useDeferredValue","ReactDOM","LayoutRouterContext","GlobalLayoutRouterContext","TemplateContext","fetchServerResponse","unresolvedThenable","ErrorBoundary","matchSegment","disableSmoothScrollDuringRouteTransition","RedirectBoundary","HTTPAccessFallbackBoundary","createRouterCacheKey","hasInterceptionRouteInCurrentTree","dispatchAppRouterAction","useRouterBFCache","normalizeAppPath","NavigationPromisesContext","getParamValueFromCacheKey","walkAddRefetch","segmentPathToWalk","treeToRecreate","segment","parallelRouteKey","isLast","length","hasOwnProperty","subTree","undefined","slice","__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE","findDOMNode","instance","window","internal_reactDOMfindDOMNode","rectProperties","shouldSkipElement","element","includes","getComputedStyle","position","rect","getBoundingClientRect","every","item","topOfElementInViewport","viewportHeight","top","getHashFragmentDomNode","hashFragment","document","body","getElementById","getElementsByName","InnerScrollAndFocusHandler","Component","componentDidMount","handlePotentialScroll","componentDidUpdate","props","focusAndScrollRef","apply","render","children","segmentPath","segmentPaths","some","scrollRefSegmentPath","index","domNode","Element","HTMLElement","process","env","NODE_ENV","parentElement","localName","nextElementSibling","scrollIntoView","htmlElement","documentElement","clientHeight","scrollTop","dontForceLayout","onlyHashChange","focus","ScrollAndFocusHandler","context","Error","InnerLayoutRouter","tree","debugNameContext","cacheNode","params","url","isActive","parentNavPromises","fullTree","resolvedPrefetchRsc","prefetchRsc","rsc","resolvedRsc","then","lazyData","refetchTree","includeNextUrl","navigatedAt","Date","now","URL","location","origin","flightRouterState","nextUrl","previousNextUrl","serverResponse","type","previousTree","content","navigationPromises","createNestedLayoutNavigationPromises","require","Provider","value","subtree","parentTree","parentCacheNode","parentSegmentPath","parentParams","LoadingBoundary","name","loading","loadingModuleData","promiseForLoading","loadingRsc","loadingStyles","loadingScripts","fallback","OuterLayoutRouter","parallelRouterKey","error","errorStyles","errorScripts","templateStyles","templateScripts","template","notFound","forbidden","unauthorized","segmentViewBoundaries","parentParallelRoutes","parallelRoutes","segmentMap","get","Map","set","parentTreeSegment","concat","activeTree","activeSegment","activeStateKey","bfcacheEntry","stateKey","cacheKey","newLazyCacheNode","head","prefetchHead","segmentBoundaryTriggerNode","segmentViewStateNode","SegmentBoundaryTriggerNode","SegmentViewStateNode","pagePrefix","page","Array","isArray","paramName","paramCacheKey","paramType","paramValue","debugName","getBoundaryDebugNameFromSegment","childDebugNameContext","isVirtual","debugNameToDisplay","child","errorComponent","SegmentStateProvider","__NEXT_CACHE_COMPONENTS","mode","push","next","isVirtualLayout"],"mappings":"AAAA;;AAaA,SACEA,mBAAmB,QAEd,wCAAuC;AAE9C,OAAOC,SACLC,QAAQ,EACRC,UAAU,EACVC,GAAG,EACHC,eAAe,EACfC,QAAQ,EACRC,gBAAgB,QAGX,QAAO;AACd,OAAOC,cAAc,YAAW;AAChC,SACEC,mBAAmB,EACnBC,yBAAyB,EACzBC,eAAe,QACV,qDAAoD;AAC3D,SAASC,mBAAmB,QAAQ,yCAAwC;AAC5E,SAASC,kBAAkB,QAAQ,wBAAuB;AAC1D,SAASC,aAAa,QAAQ,mBAAkB;AAChD,SAASC,YAAY,QAAQ,mBAAkB;AAC/C,SAASC,wCAAwC,QAAQ,sDAAqD;AAC9G,SAASC,gBAAgB,QAAQ,sBAAqB;AACtD,SAASC,0BAA0B,QAAQ,wCAAuC;AAClF,SAASC,oBAAoB,QAAQ,2CAA0C;AAC/E,SAASC,iCAAiC,QAAQ,mEAAkE;AACpH,SAASC,uBAAuB,QAAQ,qBAAoB;AAC5D,SAASC,gBAAgB,QAAiC,YAAW;A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