{"version":3,"sources":["webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/errors.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/browser.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/markup.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/transition.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/warnings.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/components.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/errorBoundaries.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/invariant.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/links.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/routeModules.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/data.js","webpack://@lemon8/web-homepage/../common/temp/split__lemon8_web_homepage/node_modules/.pnpm/@remix-run+react@1.18.1_react-dom@18.2.0_react@18.2.0/node_modules/@remix-run/react/dist/esm/routes.js"],"names":["_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","deserializeErrors","errors","entries","serialized","val","__type","ErrorResponse","status","statusText","data","internal","error","Error","message","stack","router","hmrAbortController","RemixBrowser","_props","routes","createClientRoutes","window","__remixManifest","__remixRouteModules","__remixContext","future","hydrationData","state","_objectSpread","createBrowserRouter","v7_normalizeFormMethod","v2_normalizeFormMethod","initialPathname","url","hydratedPathname","location","pathname","errorMsg","concat","console","reload","setLocation","React","subscribe","newState","RemixContext","value","manifest","routeModules","RemixErrorBoundary","component","RemixRootDefaultErrorBoundary","RouterProvider","fallbackElement","v7_startTransition","ESCAPE_LOOKUP","ESCAPE_REGEX","escapeHtml","html","replace","match","createHtml","__html","IDLE_TRANSITION","submission","undefined","type","IDLE_FETCHER","formMethod","formAction","formEncType","formData","json","text","alreadyWarned","logDeprecationOnce","useDataRouterContext","context","UNSAFE_DataRouterContext","invariant","useDataRouterStateContext","UNSAFE_DataRouterStateContext","displayName","useRemixContext","RemixRoute","_ref","id","default","Component","ErrorBoundary","CatchBoundary","v2_errorBoundary","Outlet","RemixRouteError","_ref2","useRouteError","V2_RemixRootDefaultErrorBoundary","RemixRootDefaultCatchBoundary","isRouteErrorResponse","tError","RemixCatchBoundary","catch","usePrefetchBehavior","prefetch","theirElementProps","maybePrefetch","setMaybePrefetch","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","ref","callback","forEach","entry","isIntersecting","observer","IntersectionObserver","threshold","current","observe","disconnect","setIntent","cancelIntent","setTimeout","clearTimeout","composeEventHandlers","ABSOLUTE_URL_REGEX","NavLink","_ref3","forwardedRef","to","props","_objectWithoutProperties","_excluded","isAbsolute","test","href","useHref","prefetchHandlers","NavLink$1","mergeRefs","PrefetchPageLinks","page","Link","_ref4","_excluded2","Link$1","theirHandler","ourHandler","event","defaultPrevented","linksWarning","useTransitionWarning","fetcherTypeWarning","fetcherSubmissionWarning","Links","matches","routerMatches","slice","findIndex","m","route","links","getLinksForMatches","some","link","map","isPageLinkDescriptor","imageSrcSet","imagesrcset","imagesizes","imageSizes","rel","_ref5","dataLinkProps","_excluded3","matchRoutes","PrefetchPageLinksImpl","warn","usePrefetchedStylesheets","styleLinks","setStyleLinks","interrupted","getStylesheetPrefetchLinks","then","_ref6","nextMatches","linkProps","_excluded4","useLocation","newMatchesForData","getNewMatchesForLinks","newMatchesForAssets","dataHrefs","getDataLinkHrefs","moduleHrefs","getModuleLinkHrefs","as","V1Meta","loaderData","meta","parentsData","routeId","params","routeModule","routeMeta","Array","isArray","path","_ref7","name","includes","charSet","String","isOpenGraphTag","flat","content","property","JSON","stringify","V2Meta","_matches","leafMeta","_match","handle","metaProps","tagName","isValidMetaTag","Comp","title","_metaProps$charSet","charset","err","dangerouslySetInnerHTML","Meta","v2_meta","Await","Await$1","isHydrated","Scripts","serverHandoffString","abortDelay","static","isStatic","staticContext","navigation","useNavigation","deferredScripts","initialScripts","_manifest$hmr","contextScript","activeDeferreds","join","_ref8","deferredData","pendingKeys","Set","promiseKeyValues","deferredKeys","has","push","DeferredHydrationScript","dataKey","scriptProps","trackedPromise","_error","toSerialize","_data","routeModulesScript","hmr","runtime","index","module","suppressHydrationWarning","async","a","routePreloads","imports","preloads","crossOrigin","dedupe","_ref9","document","fallback","resolve","errorElement","ErrorDeferredHydrationScript","children","_ref10","useAsyncError","array","useMatches","useMatches$1","useLoaderData","useLoaderData$1","useActionData","useActionData$1","useTransition","convertNavigationToTransition","isActionSubmission","toUpperCase","method","action","encType","_isRedirect","_isFetchActionRedirect","URL","origin","search","URLSearchParams","toString","useFetchers","useFetchers$1","f","fetcher","convertRouterFetcherToRemixFetcher","addFetcherDeprecationWarnings","useFetcher","fetcherRR","useFetcher$1","remixFetcher","fetcherWithComponents","load","submit","Form","defineProperty","get","set","configurable","enumerable","LiveReload","_len","refs","_key","React__default","constructor","getDerivedStateFromError","getDerivedStateFromProps","render","lang","style","fontFamily","padding","fontSize","background","color","overflow","RemixRootDefaultCatchBoundaryImpl","caught","errorString","RemixCatchContext","useCatch","useContext","catchVal","Provider","descriptors","_module$links","getCurrentPageModulePreloadHrefs","prefetchStyleLinks","descriptor","matchingLinks","filter","media","matchMedia","Promise","all","prefetchStyleLink","createElement","removeLink","head","contains","removeChild","onload","onerror","appendChild","object","isHtmlLinkDescriptor","mod","loadRouteModule","currentMatches","mode","parsePathPatch","isNew","matchPathChanged","_currentMatches$index","endsWith","hasLoader","shouldRevalidate","_currentMatches$","routeChoice","currentUrl","hash","currentParams","nextUrl","nextParams","defaultShouldRevalidate","manifestRoute","dedupeHrefs","searchParams","manifestPatch","hrefs","preloadsSet","reduce","deduped","str","add","parsePath","routeModulesCache","isCatchResponse","response","headers","isErrorResponse","isRedirectResponse","isDeferredResponse","_response$headers$get","fetchData","request","retry","init","signal","contentType","body","revalidation","__remixRevalidation","fetch","DEFERRED_VALUE_PLACEHOLDER_PREFIX","parseDeferredReadableStream","stream","deferredResolvers","sectionReader","readStreamSections","initialSection","next","criticalData","parse","eventKey","startsWith","reject","_iteratorAbruptCompletion","_didIteratorError","_iteratorError","_iterator","_asyncIterator","_step","done","section","sectionDataStrings","split","sectionDataString","return","resolver","AbortedDeferredError","values","UNSAFE_DeferredData","_x","_readStreamSections","_wrapAsyncGenerator","reader","getReader","buffer","sections","closed","encoder","TextEncoder","decoder","TextDecoder","readStreamSection","shift","chunk","read","splitSections","decode","mergeArrays","encode","_unused","s","_awaitAsyncGenerator","arrays","out","Uint8Array","total","arr","offset","groupRoutesByParentId","parentId","createServerRoutes","routesByParentId","hasErrorBoundary","hasCatchBoundary","dataRoute","caseSensitive","element","createClientRoutesWithHMRRevalidationOptOut","needsRevalidation","loader","createDataFunction","createShouldRevalidate","handledRevalidation","arg","loadRouteModuleWithBlockingLinks","isAction","routeModulePromise","hasAction","msg","result","getRedirect","parseInt","revalidate","redirect"],"mappings":"wEAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAUA,SAASA,GAAW,CAClBA,SAAWC,OAAOC,OAASD,OAAOC,OAAOC,KAAK,EAAI,SAAUC,EAAQ,CAClE,QAASC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GACvB,QAASI,KAAOD,EACVP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,CAAG,IAClDL,EAAOK,GAAOD,EAAOC,GAG3B,CACA,OAAOL,CACT,EACOJ,EAASa,MAAM,KAAMP,SAAS,CACvC,C,8ICvBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAiBA,SAASQ,GAAkBC,EAAQ,CACjC,GAAI,CAACA,EAAQ,OAAO,KACpB,IAAIC,EAAUf,OAAOe,QAAQD,CAAM,EAC/BE,EAAa,CAAC,EAClB,OAAS,CAACR,EAAKS,CAAG,IAAKF,EAGrB,GAAIE,GAAOA,EAAIC,SAAW,qBACxBF,EAAWR,GAAO,IAAIW,iBAAcF,EAAIG,OAAQH,EAAII,WAAYJ,EAAIK,KAAML,EAAIM,WAAa,EAAI,UACtFN,GAAOA,EAAIC,SAAW,QAAS,CACxC,IAAIM,GAAQ,IAAIC,MAAMR,EAAIS,OAAO,EACjCF,GAAMG,MAAQV,EAAIU,MAClBX,EAAWR,GAAO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A,EAER,OAAI3F,GAAmB2F,CAAM,GAAKA,EAAOnF,KAChC,MAAMK,EAA4B8E,EAAOnF,IAAI,EAE/CmF,CACT,QAAE,CACA,MAAMH,CACR,CACF,CACF,CACA,SAASI,GAAYhG,EAAU,CAC7B,IAAItZ,EAASuf,SAASjG,EAASC,QAAQpF,IAAI,gBAAgB,EAAG,EAAE,GAAK,IACjEzS,EAAM4X,EAASC,QAAQpF,IAAI,kBAAkB,EAC7CoF,EAAU,CAAC,EACXiG,EAAalG,EAASC,QAAQpF,IAAI,oBAAoB,EAC1D,OAAIqL,IACFjG,EAAQ,sBAAwBiG,I,EAE3BC,YAAS/d,EAAK,CACnB1B,SACAuZ,SACF,CAAC,CACH,C","file":"826-4b8f1d7c1092c5d07ced.js","sourcesContent":["/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}\n\nexport { _extends as extends };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { ErrorResponse } from '@remix-run/router';\n\n/**\n * @deprecated in favor of the `ErrorResponse` class in React Router. Please\n * enable the `future.v2_errorBoundary` flag to ease your migration to Remix v2.\n */\n\nfunction deserializeErrors(errors) {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in remix-server-runtime/errors.ts :)\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponse(val.status, val.statusText, val.data, val.internal === true);\n } else if (val && val.__type === \"Error\") {\n let error = new Error(val.message);\n error.stack = val.stack;\n serialized[key] = error;\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\n\nexport { deserializeErrors };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { createBrowserRouter, RouterProvider } from 'react-router-dom';\nimport { RemixContext } from './components.js';\nimport { RemixErrorBoundary, RemixRootDefaultErrorBoundary } from './errorBoundaries.js';\nimport { deserializeErrors } from './errors.js';\nimport { createClientRoutesWithHMRRevalidationOptOut, createClientRoutes } from './routes.js';\n\n/* eslint-disable prefer-let/prefer-let */\n\n/* eslint-enable prefer-let/prefer-let */\n\nlet router;\nlet hmrAbortController;\nif (import.meta && import.meta.hot) {\n import.meta.hot.accept(\"remix:manifest\", async ({\n assetsManifest,\n needsRevalidation\n }) => {\n let routeIds = [...new Set(router.state.matches.map(m => m.route.id).concat(Object.keys(window.__remixRouteModules)))];\n if (hmrAbortController) {\n hmrAbortController.abort();\n }\n hmrAbortController = new AbortController();\n let signal = hmrAbortController.signal;\n\n // Load new route modules that we've seen.\n let newRouteModules = Object.assign({}, window.__remixRouteModules, Object.fromEntries((await Promise.all(routeIds.map(async id => {\n var _assetsManifest$hmr, _window$__remixRouteM, _window$__remixRouteM2, _window$__remixRouteM3;\n if (!assetsManifest.routes[id]) {\n return null;\n }\n let imported = await import(assetsManifest.routes[id].module + `?t=${(_assetsManifest$hmr = assetsManifest.hmr) === null || _assetsManifest$hmr === void 0 ? void 0 : _assetsManifest$hmr.timestamp}`);\n return [id, {\n ...imported,\n // react-refresh takes care of updating these in-place,\n // if we don't preserve existing values we'll loose state.\n default: imported.default ? ((_window$__remixRouteM = window.__remixRouteModules[id]) === null || _window$__remixRouteM === void 0 ? void 0 : _window$__remixRouteM.default) ?? imported.default : imported.default,\n CatchBoundary: imported.CatchBoundary ? ((_window$__remixRouteM2 = window.__remixRouteModules[id]) === null || _window$__remixRouteM2 === void 0 ? void 0 : _window$__remixRouteM2.CatchBoundary) ?? imported.CatchBoundary : imported.CatchBoundary,\n ErrorBoundary: imported.ErrorBoundary ? ((_window$__remixRouteM3 = window.__remixRouteModules[id]) === null || _window$__remixRouteM3 === void 0 ? void 0 : _window$__remixRouteM3.ErrorBoundary) ?? imported.ErrorBoundary : imported.ErrorBoundary\n }];\n }))).filter(Boolean)));\n Object.assign(window.__remixRouteModules, newRouteModules);\n // Create new routes\n let routes = createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, assetsManifest.routes, window.__remixRouteModules, window.__remixContext.future);\n\n // This is temporary API and will be more granular before release\n router._internalSetRoutes(routes);\n\n // Wait for router to be idle before updating the manifest and route modules\n // and triggering a react-refresh\n let unsub = router.subscribe(state => {\n if (state.revalidation === \"idle\") {\n unsub();\n // Abort if a new update comes in while we're waiting for the\n // router to be idle.\n if (signal.aborted) return;\n // Ensure RouterProvider setState has flushed before re-rendering\n setTimeout(() => {\n Object.assign(window.__remixManifest, assetsManifest);\n window.$RefreshRuntime$.performReactRefresh();\n }, 1);\n }\n });\n window.__remixRevalidation = (window.__remixRevalidation || 0) + 1;\n router.revalidate();\n });\n}\n\n/**\n * The entry point for a Remix app when it is rendered in the browser (in\n * `app/entry.client.js`). This component is used by React to hydrate the HTML\n * that was received from the server.\n */\nfunction RemixBrowser(_props) {\n if (!router) {\n let routes = createClientRoutes(window.__remixManifest.routes, window.__remixRouteModules, window.__remixContext.future);\n let hydrationData = window.__remixContext.state;\n if (hydrationData && hydrationData.errors) {\n hydrationData = {\n ...hydrationData,\n errors: deserializeErrors(hydrationData.errors)\n };\n }\n router = createBrowserRouter(routes, {\n hydrationData,\n future: {\n // Pass through the Remix future flag to avoid a v1 breaking change in\n // useNavigation() - users can control the casing via the flag in v1.\n // useFetcher still always uppercases in the back-compat layer in v1.\n // In v2 we can just always pass true here and remove the back-compat\n // layer\n v7_normalizeFormMethod: window.__remixContext.future.v2_normalizeFormMethod\n }\n });\n\n // Hard reload if the path we tried to load is not the current path.\n // This is usually the result of 2 rapid back/forward clicks from an\n // external site into a Remix app, where we initially start the load for\n // one URL and while the JS chunks are loading a second forward click moves\n // us to a new URL. Avoid comparing search params because of CDNs which\n // can be configured to ignore certain params and only pathname is relevant\n // towards determining the route matches.\n let initialPathname = window.__remixContext.url;\n let hydratedPathname = window.location.pathname;\n if (initialPathname !== hydratedPathname) {\n let errorMsg = `Initial URL (${initialPathname}) does not match URL at time of hydration ` + `(${hydratedPathname}), reloading page...`;\n console.error(errorMsg);\n window.location.reload();\n }\n }\n let [location, setLocation] = React.useState(router.state.location);\n React.useLayoutEffect(() => {\n return router.subscribe(newState => {\n if (newState.location !== location) {\n setLocation(newState.location);\n }\n });\n }, [location]);\n\n // We need to include a wrapper RemixErrorBoundary here in case the root error\n // boundary also throws and we need to bubble up outside of the router entirely.\n // Then we need a stateful location here so the user can back-button navigate\n // out of there\n return /*#__PURE__*/React.createElement(RemixContext.Provider, {\n value: {\n manifest: window.__remixManifest,\n routeModules: window.__remixRouteModules,\n future: window.__remixContext.future\n }\n }, /*#__PURE__*/React.createElement(RemixErrorBoundary, {\n location: location,\n component: RemixRootDefaultErrorBoundary\n }, /*#__PURE__*/React.createElement(RouterProvider, {\n router: router,\n fallbackElement: null,\n future: {\n v7_startTransition: true\n }\n })));\n}\n\nexport { RemixBrowser };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// This escapeHtml utility is based on https://github.com/zertosh/htmlescape\n// License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE\n\n// We've chosen to inline the utility here to reduce the number of npm dependencies we have,\n// slightly decrease the code size compared the original package and make it esm compatible.\n\nconst ESCAPE_LOOKUP = {\n \"&\": \"\\\\u0026\",\n \">\": \"\\\\u003e\",\n \"<\": \"\\\\u003c\",\n \"\\u2028\": \"\\\\u2028\",\n \"\\u2029\": \"\\\\u2029\"\n};\nconst ESCAPE_REGEX = /[&><\\u2028\\u2029]/g;\nfunction escapeHtml(html) {\n return html.replace(ESCAPE_REGEX, match => ESCAPE_LOOKUP[match]);\n}\nfunction createHtml(html) {\n return {\n __html: html\n };\n}\n\nexport { createHtml, escapeHtml };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n// Thanks https://github.com/sindresorhus/type-fest!\n\n// Fetchers need a separate set of types to reflect the json/text submission\n// support in react-router. We do not carry that into useTransition since\n// it's deprecated\n// TODO: keep data around on resubmission?\nconst IDLE_TRANSITION = {\n state: \"idle\",\n submission: undefined,\n location: undefined,\n type: \"idle\"\n};\nconst IDLE_FETCHER = {\n state: \"idle\",\n type: \"init\",\n data: undefined,\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n submission: undefined\n};\n\nexport { IDLE_FETCHER, IDLE_TRANSITION };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nconst alreadyWarned = {};\nfunction logDeprecationOnce(message, key = message) {\n if (process.env.NODE_ENV !== \"production\" && !alreadyWarned[key]) {\n alreadyWarned[key] = true;\n console.warn(message);\n }\n}\n\nexport { logDeprecationOnce };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { extends as _extends } from './_virtual/_rollupPluginBabelHelpers.js';\nimport * as React from 'react';\nimport { useHref, NavLink as NavLink$1, Link as Link$1, matchRoutes, useLocation, Await as Await$1, useNavigation, useAsyncError, useMatches as useMatches$1, useLoaderData as useLoaderData$1, useActionData as useActionData$1, useFetchers as useFetchers$1, useFetcher as useFetcher$1, UNSAFE_DataRouterContext, UNSAFE_DataRouterStateContext, Outlet, useRouteError, isRouteErrorResponse } from 'react-router-dom';\nimport { RemixRootDefaultErrorBoundary, RemixCatchBoundary, V2_RemixRootDefaultErrorBoundary, RemixRootDefaultCatchBoundary } from './errorBoundaries.js';\nimport invariant from './invariant.js';\nimport { getLinksForMatches, isPageLinkDescriptor, getNewMatchesForLinks, getDataLinkHrefs, getModuleLinkHrefs, getStylesheetPrefetchLinks } from './links.js';\nimport { escapeHtml, createHtml } from './markup.js';\nimport { IDLE_TRANSITION, IDLE_FETCHER } from './transition.js';\nimport { logDeprecationOnce } from './warnings.js';\n\nfunction useDataRouterContext() {\n let context = React.useContext(UNSAFE_DataRouterContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\nfunction useDataRouterStateContext() {\n let context = React.useContext(UNSAFE_DataRouterStateContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// RemixContext\n\nconst RemixContext = /*#__PURE__*/React.createContext(undefined);\nRemixContext.displayName = \"Remix\";\nfunction useRemixContext() {\n let context = React.useContext(RemixContext);\n invariant(context, \"You must render this element inside a element\");\n return context;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// RemixRoute\n\nfunction RemixRoute({\n id\n}) {\n let {\n routeModules,\n future\n } = useRemixContext();\n invariant(routeModules, \"Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules.\\n\" + \"Check this link for more details:\\nhttps://remix.run/pages/gotchas#server-code-in-client-bundles\");\n let {\n default: Component,\n ErrorBoundary,\n CatchBoundary\n } = routeModules[id];\n\n // Default Component to Outlet if we expose boundary UI components\n if (!Component && (ErrorBoundary || !future.v2_errorBoundary && CatchBoundary)) {\n Component = Outlet;\n }\n invariant(Component, `Route \"${id}\" has no component! Please go add a \\`default\\` export in the route module file.\\n` + \"If you were trying to navigate or submit to a resource route, use `` instead of `` or `
`.\");\n return /*#__PURE__*/React.createElement(Component, null);\n}\nfunction RemixRouteError({\n id\n}) {\n let {\n future,\n routeModules\n } = useRemixContext();\n\n // This checks prevent cryptic error messages such as: 'Cannot read properties of undefined (reading 'root')'\n invariant(routeModules, \"Cannot initialize 'routeModules'. This normally occurs when you have server code in your client modules.\\n\" + \"Check this link for more details:\\nhttps://remix.run/pages/gotchas#server-code-in-client-bundles\");\n let error = useRouteError();\n let {\n CatchBoundary,\n ErrorBoundary\n } = routeModules[id];\n if (future.v2_errorBoundary) {\n // Provide defaults for the root route if they are not present\n if (id === \"root\") {\n ErrorBoundary || (ErrorBoundary = V2_RemixRootDefaultErrorBoundary);\n }\n if (ErrorBoundary) {\n // TODO: Unsure if we can satisfy the typings here\n // @ts-expect-error\n return /*#__PURE__*/React.createElement(ErrorBoundary, null);\n }\n throw error;\n }\n\n // Provide defaults for the root route if they are not present\n if (id === \"root\") {\n CatchBoundary || (CatchBoundary = RemixRootDefaultCatchBoundary);\n ErrorBoundary || (ErrorBoundary = RemixRootDefaultErrorBoundary);\n }\n if (isRouteErrorResponse(error)) {\n let tError = error;\n if (!!(tError !== null && tError !== void 0 && tError.error) && tError.status !== 404 && ErrorBoundary) {\n // Internal framework-thrown ErrorResponses\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n error: tError.error\n });\n }\n if (CatchBoundary) {\n // User-thrown ErrorResponses\n return /*#__PURE__*/React.createElement(RemixCatchBoundary, {\n catch: error,\n component: CatchBoundary\n });\n }\n }\n if (error instanceof Error && ErrorBoundary) {\n // User- or framework-thrown Errors\n return /*#__PURE__*/React.createElement(ErrorBoundary, {\n error: error\n });\n }\n throw error;\n}\n////////////////////////////////////////////////////////////////////////////////\n// Public API\n\n/**\n * Defines the prefetching behavior of the link:\n *\n * - \"intent\": Fetched when the user focuses or hovers the link\n * - \"render\": Fetched when the link is rendered\n * - \"none\": Never fetched\n */\nfunction usePrefetchBehavior(prefetch, theirElementProps) {\n let [maybePrefetch, setMaybePrefetch] = React.useState(false);\n let [shouldPrefetch, setShouldPrefetch] = React.useState(false);\n let {\n onFocus,\n onBlur,\n onMouseEnter,\n onMouseLeave,\n onTouchStart\n } = theirElementProps;\n let ref = React.useRef(null);\n React.useEffect(() => {\n if (prefetch === \"render\") {\n setShouldPrefetch(true);\n }\n if (prefetch === \"viewport\") {\n let callback = entries => {\n entries.forEach(entry => {\n setShouldPrefetch(entry.isIntersecting);\n });\n };\n let observer = new IntersectionObserver(callback, {\n threshold: 0.5\n });\n if (ref.current) observer.observe(ref.current);\n return () => {\n observer.disconnect();\n };\n }\n }, [prefetch]);\n let setIntent = () => {\n if (prefetch === \"intent\") {\n setMaybePrefetch(true);\n }\n };\n let cancelIntent = () => {\n if (prefetch === \"intent\") {\n setMaybePrefetch(false);\n setShouldPrefetch(false);\n }\n };\n React.useEffect(() => {\n if (maybePrefetch) {\n let id = setTimeout(() => {\n setShouldPrefetch(true);\n }, 100);\n return () => {\n clearTimeout(id);\n };\n }\n }, [maybePrefetch]);\n return [shouldPrefetch, ref, {\n onFocus: composeEventHandlers(onFocus, setIntent),\n onBlur: composeEventHandlers(onBlur, cancelIntent),\n onMouseEnter: composeEventHandlers(onMouseEnter, setIntent),\n onMouseLeave: composeEventHandlers(onMouseLeave, cancelIntent),\n onTouchStart: composeEventHandlers(onTouchStart, setIntent)\n }];\n}\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/**\n * A special kind of `` that knows whether or not it is \"active\".\n *\n * @see https://remix.run/components/nav-link\n */\nlet NavLink = /*#__PURE__*/React.forwardRef(({\n to,\n prefetch = \"none\",\n ...props\n}, forwardedRef) => {\n let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n let href = useHref(to);\n let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(NavLink$1, _extends({}, props, prefetchHandlers, {\n ref: mergeRefs(forwardedRef, ref),\n to: to\n })), shouldPrefetch && !isAbsolute ? /*#__PURE__*/React.createElement(PrefetchPageLinks, {\n page: href\n }) : null);\n});\nNavLink.displayName = \"NavLink\";\n\n/**\n * This component renders an anchor tag and is the primary way the user will\n * navigate around your website.\n *\n * @see https://remix.run/components/link\n */\nlet Link = /*#__PURE__*/React.forwardRef(({\n to,\n prefetch = \"none\",\n ...props\n}, forwardedRef) => {\n let isAbsolute = typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to);\n let href = useHref(to);\n let [shouldPrefetch, ref, prefetchHandlers] = usePrefetchBehavior(prefetch, props);\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Link$1, _extends({}, props, prefetchHandlers, {\n ref: mergeRefs(forwardedRef, ref),\n to: to\n })), shouldPrefetch && !isAbsolute ? /*#__PURE__*/React.createElement(PrefetchPageLinks, {\n page: href\n }) : null);\n});\nLink.displayName = \"Link\";\nfunction composeEventHandlers(theirHandler, ourHandler) {\n return event => {\n theirHandler && theirHandler(event);\n if (!event.defaultPrevented) {\n ourHandler(event);\n }\n };\n}\nlet linksWarning = \"⚠️ REMIX FUTURE CHANGE: The behavior of links `imagesizes` and `imagesrcset` will be changing in v2. \" + \"Only the React camel case versions will be valid. Please change to `imageSizes` and `imageSrcSet`. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#links-imagesizes-and-imagesrcset\";\nlet useTransitionWarning = \"⚠️ REMIX FUTURE CHANGE: `useTransition` will be removed in v2 in favor of `useNavigation`. \" + \"You can prepare for this change at your convenience by updating to `useNavigation`. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usetransition\";\nlet fetcherTypeWarning = \"⚠️ REMIX FUTURE CHANGE: `fetcher.type` will be removed in v2. \" + \"Please use `fetcher.state`, `fetcher.formData`, and `fetcher.data` to achieve the same UX. \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher\";\nlet fetcherSubmissionWarning = \"⚠️ REMIX FUTURE CHANGE : `fetcher.submission` will be removed in v2. \" + \"The submission fields are now part of the fetcher object itself (`fetcher.formData`). \" + \"For instructions on making this change see \" + \"https://remix.run/docs/en/v1.15.0/pages/v2#usefetcher\";\n\n/**\n * Renders the `` tags for the current routes.\n *\n * @see https://remix.run/components/links\n */\nfunction Links() {\n let {\n manifest,\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches\n } = useDataRouterStateContext();\n let matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let links = React.useMemo(() => getLinksForMatches(matches, routeModules, manifest), [matches, routeModules, manifest]);\n React.useEffect(() => {\n if (links.some(link => \"imagesizes\" in link || \"imagesrcset\" in link)) {\n logDeprecationOnce(linksWarning);\n }\n }, [links]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, links.map(link => {\n if (isPageLinkDescriptor(link)) {\n return /*#__PURE__*/React.createElement(PrefetchPageLinks, _extends({\n key: link.page\n }, link));\n }\n let imageSrcSet = null;\n\n // In React 17, and will warn\n // because the DOM attributes aren't recognized, so users need to pass\n // them in all lowercase to forward the attributes to the node without a\n // warning. Normalize so that either property can be used in Remix.\n if (\"useId\" in React) {\n if (link.imagesrcset) {\n link.imageSrcSet = imageSrcSet = link.imagesrcset;\n delete link.imagesrcset;\n }\n if (link.imagesizes) {\n link.imageSizes = link.imagesizes;\n delete link.imagesizes;\n }\n } else {\n if (link.imageSrcSet) {\n link.imagesrcset = imageSrcSet = link.imageSrcSet;\n delete link.imageSrcSet;\n }\n if (link.imageSizes) {\n link.imagesizes = link.imageSizes;\n delete link.imageSizes;\n }\n }\n return /*#__PURE__*/React.createElement(\"link\", _extends({\n key: link.rel + (link.href || \"\") + (imageSrcSet || \"\")\n }, link));\n }));\n}\n\n/**\n * This component renders all of the `` and\n * `` tags for all the assets (data, modules, css) of\n * a given page.\n *\n * @param props\n * @param props.page\n * @see https://remix.run/components/prefetch-page-links\n */\nfunction PrefetchPageLinks({\n page,\n ...dataLinkProps\n}) {\n let {\n router\n } = useDataRouterContext();\n let matches = React.useMemo(() => matchRoutes(router.routes, page), [router.routes, page]);\n if (!matches) {\n console.warn(`Tried to prefetch ${page} but no routes matched.`);\n return null;\n }\n return /*#__PURE__*/React.createElement(PrefetchPageLinksImpl, _extends({\n page: page,\n matches: matches\n }, dataLinkProps));\n}\nfunction usePrefetchedStylesheets(matches) {\n let {\n manifest,\n routeModules\n } = useRemixContext();\n let [styleLinks, setStyleLinks] = React.useState([]);\n React.useEffect(() => {\n let interrupted = false;\n getStylesheetPrefetchLinks(matches, manifest, routeModules).then(links => {\n if (!interrupted) setStyleLinks(links);\n });\n return () => {\n interrupted = true;\n };\n }, [matches, manifest, routeModules]);\n return styleLinks;\n}\nfunction PrefetchPageLinksImpl({\n page,\n matches: nextMatches,\n ...linkProps\n}) {\n let location = useLocation();\n let {\n manifest\n } = useRemixContext();\n let {\n matches\n } = useDataRouterStateContext();\n let newMatchesForData = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"data\"), [page, nextMatches, matches, manifest, location]);\n let newMatchesForAssets = React.useMemo(() => getNewMatchesForLinks(page, nextMatches, matches, manifest, location, \"assets\"), [page, nextMatches, matches, manifest, location]);\n let dataHrefs = React.useMemo(() => getDataLinkHrefs(page, newMatchesForData, manifest), [newMatchesForData, page, manifest]);\n let moduleHrefs = React.useMemo(() => getModuleLinkHrefs(newMatchesForAssets, manifest), [newMatchesForAssets, manifest]);\n\n // needs to be a hook with async behavior because we need the modules, not\n // just the manifest like the other links in here.\n let styleLinks = usePrefetchedStylesheets(newMatchesForAssets);\n return /*#__PURE__*/React.createElement(React.Fragment, null, dataHrefs.map(href => /*#__PURE__*/React.createElement(\"link\", _extends({\n key: href,\n rel: \"prefetch\",\n as: \"fetch\",\n href: href\n }, linkProps))), moduleHrefs.map(href => /*#__PURE__*/React.createElement(\"link\", _extends({\n key: href,\n rel: \"modulepreload\",\n href: href\n }, linkProps))), styleLinks.map(link =>\n /*#__PURE__*/\n // these don't spread `linkProps` because they are full link descriptors\n // already with their own props\n React.createElement(\"link\", _extends({\n key: link.href\n }, link))));\n}\n\n/**\n * Renders the `` and `<meta>` tags for the current routes.\n *\n * @see https://remix.run/components/meta\n */\nfunction V1Meta() {\n let {\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches,\n loaderData\n } = useDataRouterStateContext();\n let location = useLocation();\n let matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let meta = {};\n let parentsData = {};\n for (let match of matches) {\n let routeId = match.route.id;\n let data = loaderData[routeId];\n let params = match.params;\n let routeModule = routeModules[routeId];\n if (routeModule.meta) {\n let routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n data,\n parentsData,\n params,\n location\n }) : routeModule.meta;\n if (routeMeta && Array.isArray(routeMeta)) {\n throw new Error(\"The route at \" + match.route.path + \" returns an array. This is only supported with the `v2_meta` future flag \" + \"in the Remix config. Either set the flag to `true` or update the route's \" + \"meta function to return an object.\" + \"\\n\\nTo reference the v1 meta function API, see https://remix.run/route/meta\"\n // TODO: Add link to the docs once they are written\n // + \"\\n\\nTo reference future flags and the v2 meta API, see https://remix.run/file-conventions/remix-config#future-v2-meta.\"\n );\n }\n\n Object.assign(meta, routeMeta);\n }\n parentsData[routeId] = data;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, Object.entries(meta).map(([name, value]) => {\n if (!value) {\n return null;\n }\n if ([\"charset\", \"charSet\"].includes(name)) {\n return /*#__PURE__*/React.createElement(\"meta\", {\n key: \"charSet\",\n charSet: value\n });\n }\n if (name === \"title\") {\n return /*#__PURE__*/React.createElement(\"title\", {\n key: \"title\"\n }, String(value));\n }\n\n // Open Graph tags use the `property` attribute, while other meta tags\n // use `name`. See https://ogp.me/\n //\n // Namespaced attributes:\n // - https://ogp.me/#type_music\n // - https://ogp.me/#type_video\n // - https://ogp.me/#type_article\n // - https://ogp.me/#type_book\n // - https://ogp.me/#type_profile\n //\n // Facebook specific tags begin with `fb:` and also use the `property`\n // attribute.\n //\n // Twitter specific tags begin with `twitter:` but they use `name`, so\n // they are excluded.\n let isOpenGraphTag = /^(og|music|video|article|book|profile|fb):.+$/.test(name);\n return [value].flat().map(content => {\n if (isOpenGraphTag) {\n return /*#__PURE__*/React.createElement(\"meta\", {\n property: name,\n content: content,\n key: name + content\n });\n }\n if (typeof content === \"string\") {\n return /*#__PURE__*/React.createElement(\"meta\", {\n name: name,\n content: content,\n key: name + content\n });\n }\n return /*#__PURE__*/React.createElement(\"meta\", _extends({\n key: name + JSON.stringify(content)\n }, content));\n });\n }));\n}\nfunction V2Meta() {\n let {\n routeModules\n } = useRemixContext();\n let {\n errors,\n matches: routerMatches,\n loaderData\n } = useDataRouterStateContext();\n let location = useLocation();\n let _matches = errors ? routerMatches.slice(0, routerMatches.findIndex(m => errors[m.route.id]) + 1) : routerMatches;\n let meta = [];\n let leafMeta = null;\n let matches = [];\n for (let i = 0; i < _matches.length; i++) {\n let _match = _matches[i];\n let routeId = _match.route.id;\n let data = loaderData[routeId];\n let params = _match.params;\n let routeModule = routeModules[routeId];\n let routeMeta = [];\n let match = {\n id: routeId,\n data,\n meta: [],\n params: _match.params,\n pathname: _match.pathname,\n handle: _match.route.handle,\n // TODO: Remove in v2. Only leaving it for now because we used it in\n // examples and there's no reason to crash someone's build for one line.\n // They'll get a TS error from the type updates anyway.\n // @ts-expect-error\n get route() {\n console.warn(\"The meta function in \" + _match.route.path + \" accesses the `route` property on `matches`. This is deprecated and will be removed in Remix version 2. See\");\n return _match.route;\n }\n };\n matches[i] = match;\n if (routeModule !== null && routeModule !== void 0 && routeModule.meta) {\n routeMeta = typeof routeModule.meta === \"function\" ? routeModule.meta({\n data,\n params,\n location,\n matches\n }) : Array.isArray(routeModule.meta) ? [...routeModule.meta] : routeModule.meta;\n } else if (leafMeta) {\n // We only assign the route's meta to the nearest leaf if there is no meta\n // export in the route. The meta function may return a falsey value which\n // is effectively the same as an empty array.\n routeMeta = [...leafMeta];\n }\n routeMeta = routeMeta || [];\n if (!Array.isArray(routeMeta)) {\n throw new Error(\"The `v2_meta` API is enabled in the Remix config, but the route at \" + _match.route.path + \" returns an invalid value. In v2, all route meta functions must \" + \"return an array of meta objects.\" +\n // TODO: Add link to the docs once they are written\n // \"\\n\\nTo reference future flags and the v2 meta API, see https://remix.run/file-conventions/remix-config#future-v2-meta.\" +\n \"\\n\\nTo reference the v1 meta function API, see https://remix.run/route/meta\");\n }\n match.meta = routeMeta;\n matches[i] = match;\n meta = [...routeMeta];\n leafMeta = meta;\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, meta.flat().map(metaProps => {\n if (!metaProps) {\n return null;\n }\n if (\"tagName\" in metaProps) {\n let tagName = metaProps.tagName;\n delete metaProps.tagName;\n if (!isValidMetaTag(tagName)) {\n console.warn(`A meta object uses an invalid tagName: ${tagName}. Expected either 'link' or 'meta'`);\n return null;\n }\n let Comp = tagName;\n return /*#__PURE__*/React.createElement(Comp, _extends({\n key: JSON.stringify(metaProps)\n }, metaProps));\n }\n if (\"title\" in metaProps) {\n return /*#__PURE__*/React.createElement(\"title\", {\n key: \"title\"\n }, String(metaProps.title));\n }\n if (\"charset\" in metaProps) {\n metaProps.charSet ?? (metaProps.charSet = metaProps.charset);\n delete metaProps.charset;\n }\n if (\"charSet\" in metaProps && metaProps.charSet != null) {\n return typeof metaProps.charSet === \"string\" ? /*#__PURE__*/React.createElement(\"meta\", {\n key: \"charSet\",\n charSet: metaProps.charSet\n }) : null;\n }\n if (\"script:ld+json\" in metaProps) {\n let json = null;\n try {\n json = JSON.stringify(metaProps[\"script:ld+json\"]);\n } catch (err) {}\n return json != null && /*#__PURE__*/React.createElement(\"script\", {\n key: \"script:ld+json\",\n type: \"application/ld+json\",\n dangerouslySetInnerHTML: {\n __html: JSON.stringify(metaProps[\"script:ld+json\"])\n }\n });\n }\n return /*#__PURE__*/React.createElement(\"meta\", _extends({\n key: JSON.stringify(metaProps)\n }, metaProps));\n }));\n}\nfunction isValidMetaTag(tagName) {\n return typeof tagName === \"string\" && /^(meta|link)$/.test(tagName);\n}\nfunction Meta() {\n let {\n future\n } = useRemixContext();\n return future !== null && future !== void 0 && future.v2_meta ? /*#__PURE__*/React.createElement(V2Meta, null) : /*#__PURE__*/React.createElement(V1Meta, null);\n}\nfunction Await(props) {\n return /*#__PURE__*/React.createElement(Await$1, props);\n}\n\n/**\n * Tracks whether Remix has finished hydrating or not, so scripts can be skipped\n * during client-side updates.\n */\nlet isHydrated = false;\n/**\n * Renders the `<script>` tags needed for the initial render. Bundles for\n * additional routes are loaded later as needed.\n *\n * @param props Additional properties to add to each script tag that is rendered.\n * In addition to scripts, \\<link rel=\"modulepreload\"> tags receive the crossOrigin\n * property if provided.\n *\n * @see https://remix.run/components/scripts\n */\nfunction Scripts(props) {\n let {\n manifest,\n serverHandoffString,\n abortDelay\n } = useRemixContext();\n let {\n router,\n static: isStatic,\n staticContext\n } = useDataRouterContext();\n let {\n matches\n } = useDataRouterStateContext();\n let navigation = useNavigation();\n React.useEffect(() => {\n isHydrated = true;\n }, []);\n let deferredScripts = [];\n let initialScripts = React.useMemo(() => {\n var _manifest$hmr;\n let contextScript = staticContext ? `window.__remixContext = ${serverHandoffString};` : \" \";\n let activeDeferreds = staticContext === null || staticContext === void 0 ? void 0 : staticContext.activeDeferreds;\n // This sets up the __remixContext with utility functions used by the\n // deferred scripts.\n // - __remixContext.p is a function that takes a resolved value or error and returns a promise.\n // This is used for transmitting pre-resolved promises from the server to the client.\n // - __remixContext.n is a function that takes a routeID and key to returns a promise for later\n // resolution by the subsequently streamed chunks.\n // - __remixContext.r is a function that takes a routeID, key and value or error and resolves\n // the promise created by __remixContext.n.\n // - __remixContext.t is a a map or routeId to keys to an object containing `e` and `r` methods\n // to resolve or reject the promise created by __remixContext.n.\n // - __remixContext.a is the active number of deferred scripts that should be rendered to match\n // the SSR tree for hydration on the client.\n contextScript += !activeDeferreds ? \"\" : [\"__remixContext.p = function(v,e,p,x) {\", \" if (typeof e !== 'undefined') {\", process.env.NODE_ENV === \"development\" ? \" x=new Error(e.message);\\n x.stack=e.stack;\" : ' x=new Error(\"Unexpected Server Error\");\\n x.stack=undefined;', \" p=Promise.reject(x);\", \" } else {\", \" p=Promise.resolve(v);\", \" }\", \" return p;\", \"};\", \"__remixContext.n = function(i,k) {\", \" __remixContext.t = __remixContext.t || {};\", \" __remixContext.t[i] = __remixContext.t[i] || {};\", \" let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});\", typeof abortDelay === \"number\" ? `setTimeout(() => {if(typeof p._error !== \"undefined\" || typeof p._data !== \"undefined\"){return;} __remixContext.t[i][k].e(new Error(\"Server timeout.\"))}, ${abortDelay});` : \"\", \" return p;\", \"};\", \"__remixContext.r = function(i,k,v,e,p,x) {\", \" p = __remixContext.t[i][k];\", \" if (typeof e !== 'undefined') {\", process.env.NODE_ENV === \"development\" ? \" x=new Error(e.message);\\n x.stack=e.stack;\" : ' x=new Error(\"Unexpected Server Error\");\\n x.stack=undefined;', \" p.e(x);\", \" } else {\", \" p.r(v);\", \" }\", \"};\"].join(\"\\n\") + Object.entries(activeDeferreds).map(([routeId, deferredData]) => {\n let pendingKeys = new Set(deferredData.pendingKeys);\n let promiseKeyValues = deferredData.deferredKeys.map(key => {\n if (pendingKeys.has(key)) {\n deferredScripts.push( /*#__PURE__*/React.createElement(DeferredHydrationScript, {\n key: `${routeId} | ${key}`,\n deferredData: deferredData,\n routeId: routeId,\n dataKey: key,\n scriptProps: props\n }));\n return `${JSON.stringify(key)}:__remixContext.n(${JSON.stringify(routeId)}, ${JSON.stringify(key)})`;\n } else {\n let trackedPromise = deferredData.data[key];\n if (typeof trackedPromise._error !== \"undefined\") {\n let toSerialize = process.env.NODE_ENV === \"development\" ? {\n message: trackedPromise._error.message,\n stack: trackedPromise._error.stack\n } : {\n message: \"Unexpected Server Error\",\n stack: undefined\n };\n return `${JSON.stringify(key)}:__remixContext.p(!1, ${escapeHtml(JSON.stringify(toSerialize))})`;\n } else {\n if (typeof trackedPromise._data === \"undefined\") {\n throw new Error(`The deferred data for ${key} was not resolved, did you forget to return data from a deferred promise?`);\n }\n return `${JSON.stringify(key)}:__remixContext.p(${escapeHtml(JSON.stringify(trackedPromise._data))})`;\n }\n }\n }).join(\",\\n\");\n return `Object.assign(__remixContext.state.loaderData[${JSON.stringify(routeId)}], {${promiseKeyValues}});`;\n }).join(\"\\n\") + (deferredScripts.length > 0 ? `__remixContext.a=${deferredScripts.length};` : \"\");\n let routeModulesScript = !isStatic ? \" \" : `${(_manifest$hmr = manifest.hmr) !== null && _manifest$hmr !== void 0 && _manifest$hmr.runtime ? `import ${JSON.stringify(manifest.hmr.runtime)};` : \"\"}import ${JSON.stringify(manifest.url)};\n${matches.map((match, index) => `import * as route${index} from ${JSON.stringify(manifest.routes[match.route.id].module)};`).join(\"\\n\")}\nwindow.__remixRouteModules = {${matches.map((match, index) => `${JSON.stringify(match.route.id)}:route${index}`).join(\",\")}};\n\nimport(${JSON.stringify(manifest.entry.module)});`;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"script\", _extends({}, props, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: createHtml(contextScript),\n type: undefined\n })), /*#__PURE__*/React.createElement(\"script\", _extends({}, props, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: createHtml(routeModulesScript),\n type: \"module\",\n async: true\n })));\n // disabled deps array because we are purposefully only rendering this once\n // for hydration, after that we want to just continue rendering the initial\n // scripts as they were when the page first loaded\n // eslint-disable-next-line\n }, []);\n if (!isStatic && typeof __remixContext === \"object\" && __remixContext.a) {\n for (let i = 0; i < __remixContext.a; i++) {\n deferredScripts.push( /*#__PURE__*/React.createElement(DeferredHydrationScript, {\n key: i,\n scriptProps: props\n }));\n }\n }\n\n // avoid waterfall when importing the next route module\n let nextMatches = React.useMemo(() => {\n if (navigation.location) {\n // FIXME: can probably use transitionManager `nextMatches`\n let matches = matchRoutes(router.routes, navigation.location);\n invariant(matches, `No routes match path \"${navigation.location.pathname}\"`);\n return matches;\n }\n return [];\n }, [navigation.location, router.routes]);\n let routePreloads = matches.concat(nextMatches).map(match => {\n let route = manifest.routes[match.route.id];\n return (route.imports || []).concat([route.module]);\n }).flat(1);\n let preloads = isHydrated ? [] : manifest.entry.imports.concat(routePreloads);\n return isHydrated ? null : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"link\", {\n rel: \"modulepreload\",\n href: manifest.entry.module,\n crossOrigin: props.crossOrigin\n }), dedupe(preloads).map(path => /*#__PURE__*/React.createElement(\"link\", {\n key: path,\n rel: \"modulepreload\",\n href: path,\n crossOrigin: props.crossOrigin\n })), initialScripts, deferredScripts);\n}\nfunction DeferredHydrationScript({\n dataKey,\n deferredData,\n routeId,\n scriptProps\n}) {\n if (typeof document === \"undefined\" && deferredData && dataKey && routeId) {\n invariant(deferredData.pendingKeys.includes(dataKey), `Deferred data for route ${routeId} with key ${dataKey} was not pending but tried to render a script for it.`);\n }\n return /*#__PURE__*/React.createElement(React.Suspense, {\n fallback:\n // This makes absolutely no sense. The server renders null as a fallback,\n // but when hydrating, we need to render a script tag to avoid a hydration issue.\n // To reproduce a hydration mismatch, just render null as a fallback.\n typeof document === \"undefined\" && deferredData && dataKey && routeId ? null : /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: \" \"\n }\n }))\n }, typeof document === \"undefined\" && deferredData && dataKey && routeId ? /*#__PURE__*/React.createElement(Await, {\n resolve: deferredData.data[dataKey],\n errorElement: /*#__PURE__*/React.createElement(ErrorDeferredHydrationScript, {\n dataKey: dataKey,\n routeId: routeId,\n scriptProps: scriptProps\n }),\n children: data => /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `__remixContext.r(${JSON.stringify(routeId)}, ${JSON.stringify(dataKey)}, ${escapeHtml(JSON.stringify(data))});`\n }\n }))\n }) : /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n async: true,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: \" \"\n }\n })));\n}\nfunction ErrorDeferredHydrationScript({\n dataKey,\n routeId,\n scriptProps\n}) {\n let error = useAsyncError();\n let toSerialize = process.env.NODE_ENV === \"development\" ? {\n message: error.message,\n stack: error.stack\n } : {\n message: \"Unexpected Server Error\",\n stack: undefined\n };\n return /*#__PURE__*/React.createElement(\"script\", _extends({}, scriptProps, {\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: `__remixContext.r(${JSON.stringify(routeId)}, ${JSON.stringify(dataKey)}, !1, ${escapeHtml(JSON.stringify(toSerialize))});`\n }\n }));\n}\nfunction dedupe(array) {\n return [...new Set(array)];\n}\n\n// TODO: Can this be re-exported from RR?\n\nfunction useMatches() {\n let {\n routeModules\n } = useRemixContext();\n let matches = useMatches$1();\n return React.useMemo(() => matches.map(match => {\n let remixMatch = {\n id: match.id,\n pathname: match.pathname,\n params: match.params,\n data: match.data,\n // Need to grab handle here since we don't have it at client-side route\n // creation time\n handle: routeModules[match.id].handle\n };\n return remixMatch;\n }), [matches, routeModules]);\n}\n\n/**\n * Returns the JSON parsed data from the current route's `loader`.\n *\n * @see https://remix.run/hooks/use-loader-data\n */\nfunction useLoaderData() {\n return useLoaderData$1();\n}\n\n/**\n * Returns the JSON parsed data from the current route's `action`.\n *\n * @see https://remix.run/hooks/use-action-data\n */\nfunction useActionData() {\n return useActionData$1();\n}\n\n/**\n * Returns everything you need to know about a page transition to build pending\n * navigation indicators and optimistic UI on data mutations.\n *\n * @deprecated in favor of useNavigation\n *\n * @see https://remix.run/hooks/use-transition\n */\nfunction useTransition() {\n let navigation = useNavigation();\n React.useEffect(() => {\n logDeprecationOnce(useTransitionWarning);\n }, []);\n return React.useMemo(() => convertNavigationToTransition(navigation), [navigation]);\n}\nfunction convertNavigationToTransition(navigation) {\n let {\n location,\n state,\n formMethod,\n formAction,\n formEncType,\n formData\n } = navigation;\n if (!location) {\n return IDLE_TRANSITION;\n }\n let isActionSubmission = formMethod != null && [\"POST\", \"PUT\", \"PATCH\", \"DELETE\"].includes(formMethod.toUpperCase());\n if (state === \"submitting\" && formMethod && formAction && formEncType && formData) {\n if (isActionSubmission) {\n // Actively submitting to an action\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionSubmission\"\n };\n return transition;\n } else {\n // @remix-run/router doesn't mark loader submissions as state: \"submitting\"\n invariant(false, \"Encountered an unexpected navigation scenario in useTransition()\");\n }\n }\n if (state === \"loading\") {\n let {\n _isRedirect,\n _isFetchActionRedirect\n } = location.state || {};\n if (formMethod && formAction && formEncType && formData) {\n if (!_isRedirect) {\n if (isActionSubmission) {\n // We're reloading the same location after an action submission\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionReload\"\n };\n return transition;\n } else {\n // The new router fixes a bug in useTransition where the submission\n // \"action\" represents the request URL not the state of the <form> in\n // the DOM. Back-port it here to maintain behavior, but useNavigation\n // will fix this bug.\n let url = new URL(formAction, window.location.origin);\n\n // This typing override should be safe since this is only running for\n // GET submissions and over in @remix-run/router we have an invariant\n // if you have any non-string values in your FormData when we attempt\n // to convert them to URLSearchParams\n url.search = new URLSearchParams(formData.entries()).toString();\n\n // Actively \"submitting\" to a loader\n let transition = {\n location,\n state: \"submitting\",\n submission: {\n method: formMethod.toUpperCase(),\n action: url.pathname + url.search,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"loaderSubmission\"\n };\n return transition;\n }\n } else {\n // Redirecting after a submission\n if (isActionSubmission) {\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"actionRedirect\"\n };\n return transition;\n } else {\n let transition = {\n location,\n state,\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData: formData,\n key: \"\"\n },\n type: \"loaderSubmissionRedirect\"\n };\n return transition;\n }\n }\n } else if (_isRedirect) {\n if (_isFetchActionRedirect) {\n let transition = {\n location,\n state,\n submission: undefined,\n type: \"fetchActionRedirect\"\n };\n return transition;\n } else {\n let transition = {\n location,\n state,\n submission: undefined,\n type: \"normalRedirect\"\n };\n return transition;\n }\n }\n }\n\n // If no scenarios above match, then it's a normal load!\n let transition = {\n location,\n state: \"loading\",\n submission: undefined,\n type: \"normalLoad\"\n };\n return transition;\n}\n\n/**\n * Provides all fetchers currently on the page. Useful for layouts and parent\n * routes that need to provide pending/optimistic UI regarding the fetch.\n *\n * @see https://remix.run/api/remix#usefetchers\n */\nfunction useFetchers() {\n let fetchers = useFetchers$1();\n return fetchers.map(f => {\n let fetcher = convertRouterFetcherToRemixFetcher({\n state: f.state,\n data: f.data,\n formMethod: f.formMethod,\n formAction: f.formAction,\n formEncType: f.formEncType,\n formData: f.formData,\n json: f.json,\n text: f.text,\n \" _hasFetcherDoneAnything \": f[\" _hasFetcherDoneAnything \"]\n });\n addFetcherDeprecationWarnings(fetcher);\n return fetcher;\n });\n}\n/**\n * Interacts with route loaders and actions without causing a navigation. Great\n * for any interaction that stays on the same page.\n *\n * @see https://remix.run/hooks/use-fetcher\n */\nfunction useFetcher() {\n let fetcherRR = useFetcher$1();\n return React.useMemo(() => {\n let remixFetcher = convertRouterFetcherToRemixFetcher({\n state: fetcherRR.state,\n data: fetcherRR.data,\n formMethod: fetcherRR.formMethod,\n formAction: fetcherRR.formAction,\n formEncType: fetcherRR.formEncType,\n formData: fetcherRR.formData,\n json: fetcherRR.json,\n text: fetcherRR.text,\n \" _hasFetcherDoneAnything \": fetcherRR[\" _hasFetcherDoneAnything \"]\n });\n let fetcherWithComponents = {\n ...remixFetcher,\n load: fetcherRR.load,\n submit: fetcherRR.submit,\n Form: fetcherRR.Form\n };\n addFetcherDeprecationWarnings(fetcherWithComponents);\n return fetcherWithComponents;\n }, [fetcherRR]);\n}\nfunction addFetcherDeprecationWarnings(fetcher) {\n let type = fetcher.type;\n Object.defineProperty(fetcher, \"type\", {\n get() {\n logDeprecationOnce(fetcherTypeWarning);\n return type;\n },\n set(value) {\n // Devs should *not* be doing this but we don't want to break their\n // current app if they are\n type = value;\n },\n // These settings should make this behave like a normal object `type` field\n configurable: true,\n enumerable: true\n });\n let submission = fetcher.submission;\n Object.defineProperty(fetcher, \"submission\", {\n get() {\n logDeprecationOnce(fetcherSubmissionWarning);\n return submission;\n },\n set(value) {\n // Devs should *not* be doing this but we don't want to break their\n // current app if they are\n submission = value;\n },\n // These settings should make this behave like a normal object `type` field\n configurable: true,\n enumerable: true\n });\n}\nfunction convertRouterFetcherToRemixFetcher(fetcherRR) {\n let {\n state,\n formMethod,\n formAction,\n formEncType,\n formData,\n json,\n text,\n data\n } = fetcherRR;\n let isActionSubmission = formMethod != null && [\"POST\", \"PUT\", \"PATCH\", \"DELETE\"].includes(formMethod.toUpperCase());\n if (state === \"idle\") {\n if (fetcherRR[\" _hasFetcherDoneAnything \"] === true) {\n let fetcher = {\n state: \"idle\",\n type: \"done\",\n formMethod: undefined,\n formAction: undefined,\n formEncType: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n submission: undefined,\n data\n };\n return fetcher;\n } else {\n let fetcher = IDLE_FETCHER;\n return fetcher;\n }\n }\n if (state === \"submitting\" && formMethod && formAction && formEncType && (formData || json !== undefined || text !== undefined)) {\n if (isActionSubmission) {\n // Actively submitting to an action\n let fetcher = {\n state,\n type: \"actionSubmission\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n } else {\n // @remix-run/router doesn't mark loader submissions as state: \"submitting\"\n invariant(false, \"Encountered an unexpected fetcher scenario in useFetcher()\");\n }\n }\n if (state === \"loading\") {\n if (formMethod && formAction && formEncType) {\n if (isActionSubmission) {\n if (data) {\n // In a loading state but we have data - must be an actionReload\n let fetcher = {\n state,\n type: \"actionReload\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n } else {\n let fetcher = {\n state,\n type: \"actionRedirect\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: formAction,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data: undefined\n };\n return fetcher;\n }\n } else {\n // The new router fixes a bug in useTransition where the submission\n // \"action\" represents the request URL not the state of the <form> in\n // the DOM. Back-port it here to maintain behavior, but useNavigation\n // will fix this bug.\n let url = new URL(formAction, window.location.origin);\n if (formData) {\n // This typing override should be safe since this is only running for\n // GET submissions and over in @remix-run/router we have an invariant\n // if you have any non-string values in your FormData when we attempt\n // to convert them to URLSearchParams\n url.search = new URLSearchParams(formData.entries()).toString();\n }\n\n // Actively \"submitting\" to a loader\n let fetcher = {\n state: \"submitting\",\n type: \"loaderSubmission\",\n formMethod: formMethod.toUpperCase(),\n formAction,\n formEncType,\n formData,\n json,\n text,\n // @ts-expect-error formData/json/text are mutually exclusive in the type,\n // so TS can't be sure these meet that criteria, but as a straight\n // assignment from the RR fetcher we know they will\n submission: {\n method: formMethod.toUpperCase(),\n action: url.pathname + url.search,\n encType: formEncType,\n formData,\n json,\n text,\n key: \"\"\n },\n data\n };\n return fetcher;\n }\n }\n }\n\n // If all else fails, it's a normal load!\n let fetcher = {\n state: \"loading\",\n type: \"normalLoad\",\n formMethod: undefined,\n formAction: undefined,\n formData: undefined,\n json: undefined,\n text: undefined,\n formEncType: undefined,\n submission: undefined,\n data\n };\n return fetcher;\n}\n\n// Dead Code Elimination magic for production builds.\n// This way devs don't have to worry about doing the NODE_ENV check themselves.\n// If running an un-bundled server outside of `remix dev` you will still need\n// to set the REMIX_DEV_SERVER_WS_PORT manually.\nconst LiveReload = process.env.NODE_ENV !== \"development\" ? () => null : function LiveReload({\n // TODO: remove REMIX_DEV_SERVER_WS_PORT in v2\n port,\n timeoutMs = 1000,\n nonce = undefined\n}) {\n let js = String.raw;\n return /*#__PURE__*/React.createElement(\"script\", {\n nonce: nonce,\n suppressHydrationWarning: true,\n dangerouslySetInnerHTML: {\n __html: js`\n function remixLiveReloadConnect(config) {\n let protocol = location.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n let host = location.hostname;\n let port = ${port} || (window.__remixContext && window.__remixContext.dev && window.__remixContext.dev.port) || ${Number(process.env.REMIX_DEV_SERVER_WS_PORT || 8002)};\n let socketPath = protocol + \"//\" + host + \":\" + port + \"/socket\";\n let ws = new WebSocket(socketPath);\n ws.onmessage = async (message) => {\n let event = JSON.parse(message.data);\n if (event.type === \"LOG\") {\n console.log(event.message);\n }\n if (event.type === \"RELOAD\") {\n console.log(\"💿 Reloading window ...\");\n window.location.reload();\n }\n if (event.type === \"HMR\") {\n if (!window.__hmr__ || !window.__hmr__.contexts) {\n console.log(\"💿 [HMR] No HMR context, reloading window ...\");\n window.location.reload();\n return;\n }\n if (!event.updates || !event.updates.length) return;\n let updateAccepted = false;\n let needsRevalidation = new Set();\n for (let update of event.updates) {\n console.log(\"[HMR] \" + update.reason + \" [\" + update.id +\"]\")\n if (update.revalidate) {\n needsRevalidation.add(update.routeId);\n console.log(\"[HMR] Revalidating [\" + update.routeId + \"]\");\n }\n let imported = await import(update.url + '?t=' + event.assetsManifest.hmr.timestamp);\n if (window.__hmr__.contexts[update.id]) {\n let accepted = window.__hmr__.contexts[update.id].emit(\n imported\n );\n if (accepted) {\n console.log(\"[HMR] Updated accepted by\", update.id);\n updateAccepted = true;\n }\n }\n }\n if (event.assetsManifest && window.__hmr__.contexts[\"remix:manifest\"]) {\n let accepted = window.__hmr__.contexts[\"remix:manifest\"].emit(\n { needsRevalidation, assetsManifest: event.assetsManifest }\n );\n if (accepted) {\n console.log(\"[HMR] Updated accepted by\", \"remix:manifest\");\n updateAccepted = true;\n }\n }\n if (!updateAccepted) {\n console.log(\"[HMR] Updated rejected, reloading...\");\n window.location.reload();\n }\n }\n };\n ws.onopen = () => {\n if (config && typeof config.onOpen === \"function\") {\n config.onOpen();\n }\n };\n ws.onclose = (event) => {\n if (event.code === 1006) {\n console.log(\"Remix dev asset server web socket closed. Reconnecting...\");\n setTimeout(\n () =>\n remixLiveReloadConnect({\n onOpen: () => window.location.reload(),\n }),\n ${String(timeoutMs)}\n );\n }\n };\n ws.onerror = (error) => {\n console.log(\"Remix dev asset server web socket error:\");\n console.error(error);\n };\n }\n remixLiveReloadConnect();\n `\n }\n });\n};\nfunction mergeRefs(...refs) {\n return value => {\n refs.forEach(ref => {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref != null) {\n ref.current = value;\n }\n });\n };\n}\n\nexport { Await, Link, Links, LiveReload, Meta, NavLink, PrefetchPageLinks, RemixContext, RemixRoute, RemixRouteError, Scripts, composeEventHandlers, useActionData, useFetcher, useFetchers, useLoaderData, useMatches, useTransition };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport React__default, { useContext } from 'react';\nimport { useRouteError, isRouteErrorResponse } from 'react-router-dom';\n\nclass RemixErrorBoundary extends React__default.Component {\n constructor(props) {\n super(props);\n this.state = {\n error: props.error || null,\n location: props.location\n };\n }\n static getDerivedStateFromError(error) {\n return {\n error\n };\n }\n static getDerivedStateFromProps(props, state) {\n // When we get into an error state, the user will likely click \"back\" to the\n // previous page that didn't have an error. Because this wraps the entire\n // application (even the HTML!) that will have no effect--the error page\n // continues to display. This gives us a mechanism to recover from the error\n // when the location changes.\n //\n // Whether we're in an error state or not, we update the location in state\n // so that when we are in an error state, it gets reset when a new location\n // comes in and the user recovers from the error.\n if (state.location !== props.location) {\n return {\n error: props.error || null,\n location: props.location\n };\n }\n\n // If we're not changing locations, preserve the location but still surface\n // any new errors that may come through. We retain the existing error, we do\n // this because the error provided from the app state may be cleared without\n // the location changing.\n return {\n error: props.error || state.error,\n location: state.location\n };\n }\n render() {\n if (this.state.error) {\n return /*#__PURE__*/React__default.createElement(this.props.component, {\n error: this.state.error\n });\n } else {\n return this.props.children;\n }\n }\n}\n\n/**\n * When app's don't provide a root level ErrorBoundary, we default to this.\n */\nfunction RemixRootDefaultErrorBoundary({\n error\n}) {\n // Only log client side to avoid double-logging on the server\n React__default.useEffect(() => {\n console.error(error);\n }, [error]);\n return /*#__PURE__*/React__default.createElement(\"html\", {\n lang: \"en\"\n }, /*#__PURE__*/React__default.createElement(\"head\", null, /*#__PURE__*/React__default.createElement(\"meta\", {\n charSet: \"utf-8\"\n }), /*#__PURE__*/React__default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1, viewport-fit=cover\"\n }), /*#__PURE__*/React__default.createElement(\"title\", null, \"Application Error!\")), /*#__PURE__*/React__default.createElement(\"body\", null, /*#__PURE__*/React__default.createElement(\"main\", {\n style: {\n fontFamily: \"system-ui, sans-serif\",\n padding: \"2rem\"\n }\n }, /*#__PURE__*/React__default.createElement(\"h1\", {\n style: {\n fontSize: \"24px\"\n }\n }, \"Application Error\"), error.stack ? /*#__PURE__*/React__default.createElement(\"pre\", {\n style: {\n padding: \"2rem\",\n background: \"hsla(10, 50%, 50%, 0.1)\",\n color: \"red\",\n overflow: \"auto\"\n }\n }, error.stack) : null), /*#__PURE__*/React__default.createElement(\"script\", {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"💿 Hey developer👋. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information.\"\n );\n `\n }\n })));\n}\nfunction V2_RemixRootDefaultErrorBoundary() {\n let error = useRouteError();\n if (isRouteErrorResponse(error)) {\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultCatchBoundaryImpl, {\n caught: error\n });\n } else if (error instanceof Error) {\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultErrorBoundary, {\n error: error\n });\n } else {\n let errorString = error == null ? \"Unknown Error\" : typeof error === \"object\" && \"toString\" in error ? error.toString() : JSON.stringify(error);\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultErrorBoundary, {\n error: new Error(errorString)\n });\n }\n}\nlet RemixCatchContext = /*#__PURE__*/React__default.createContext(undefined);\n\n/**\n * Returns the status code and thrown response data.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/catch-boundary\n */\nfunction useCatch() {\n return useContext(RemixCatchContext);\n}\nfunction RemixCatchBoundary({\n catch: catchVal,\n component: Component,\n children\n}) {\n if (catchVal) {\n return /*#__PURE__*/React__default.createElement(RemixCatchContext.Provider, {\n value: catchVal\n }, /*#__PURE__*/React__default.createElement(Component, null));\n }\n return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, children);\n}\n\n/**\n * When app's don't provide a root level CatchBoundary, we default to this.\n */\nfunction RemixRootDefaultCatchBoundary() {\n let caught = useCatch();\n return /*#__PURE__*/React__default.createElement(RemixRootDefaultCatchBoundaryImpl, {\n caught: caught\n });\n}\nfunction RemixRootDefaultCatchBoundaryImpl({\n caught\n}) {\n return /*#__PURE__*/React__default.createElement(\"html\", {\n lang: \"en\"\n }, /*#__PURE__*/React__default.createElement(\"head\", null, /*#__PURE__*/React__default.createElement(\"meta\", {\n charSet: \"utf-8\"\n }), /*#__PURE__*/React__default.createElement(\"meta\", {\n name: \"viewport\",\n content: \"width=device-width, initial-scale=1, viewport-fit=cover\"\n }), /*#__PURE__*/React__default.createElement(\"title\", null, \"Unhandled Thrown Response!\")), /*#__PURE__*/React__default.createElement(\"body\", null, /*#__PURE__*/React__default.createElement(\"h1\", {\n style: {\n fontFamily: \"system-ui, sans-serif\",\n padding: \"2rem\"\n }\n }, caught.status, \" \", caught.statusText), /*#__PURE__*/React__default.createElement(\"script\", {\n dangerouslySetInnerHTML: {\n __html: `\n console.log(\n \"💿 Hey developer👋. You can provide a way better UX than this when your app throws 404s (and other responses). Check out https://remix.run/guides/not-found for more information.\"\n );\n `\n }\n })));\n}\n\nexport { RemixCatchBoundary, RemixErrorBoundary, RemixRootDefaultCatchBoundary, RemixRootDefaultErrorBoundary, V2_RemixRootDefaultErrorBoundary, useCatch };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nfunction invariant(value, message) {\n if (value === false || value === null || typeof value === \"undefined\") {\n throw new Error(message);\n }\n}\n\nexport { invariant as default };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { parsePath } from 'react-router-dom';\nimport { loadRouteModule } from './routeModules.js';\n\n/**\n * Represents a `<link>` element.\n *\n * WHATWG Specification: https://html.spec.whatwg.org/multipage/semantics.html#the-link-element\n */\n\n////////////////////////////////////////////////////////////////////////////////\n/**\n * Gets all the links for a set of matches. The modules are assumed to have been\n * loaded already.\n */\nfunction getLinksForMatches(matches, routeModules, manifest) {\n let descriptors = matches.map(match => {\n var _module$links;\n let module = routeModules[match.route.id];\n return ((_module$links = module.links) === null || _module$links === void 0 ? void 0 : _module$links.call(module)) || [];\n }).flat(1);\n let preloads = getCurrentPageModulePreloadHrefs(matches, manifest);\n return dedupe(descriptors, preloads);\n}\nasync function prefetchStyleLinks(routeModule) {\n if (!routeModule.links) return;\n let descriptors = routeModule.links();\n if (!descriptors) return;\n let styleLinks = [];\n for (let descriptor of descriptors) {\n if (!isPageLinkDescriptor(descriptor) && descriptor.rel === \"stylesheet\") {\n styleLinks.push({\n ...descriptor,\n rel: \"preload\",\n as: \"style\"\n });\n }\n }\n\n // don't block for non-matching media queries\n let matchingLinks = styleLinks.filter(link => !link.media || window.matchMedia(link.media).matches);\n await Promise.all(matchingLinks.map(prefetchStyleLink));\n}\nasync function prefetchStyleLink(descriptor) {\n return new Promise(resolve => {\n let link = document.createElement(\"link\");\n Object.assign(link, descriptor);\n function removeLink() {\n // if a navigation interrupts this prefetch React will update the <head>\n // and remove the link we put in there manually, so we check if it's still\n // there before trying to remove it\n if (document.head.contains(link)) {\n document.head.removeChild(link);\n }\n }\n link.onload = () => {\n removeLink();\n resolve();\n };\n link.onerror = () => {\n removeLink();\n resolve();\n };\n document.head.appendChild(link);\n });\n}\n\n////////////////////////////////////////////////////////////////////////////////\nfunction isPageLinkDescriptor(object) {\n return object != null && typeof object.page === \"string\";\n}\nfunction isHtmlLinkDescriptor(object) {\n if (object == null) return false;\n\n // <link> may not have an href if <link rel=\"preload\"> is used with imagesrcset + imagesizes\n // https://github.com/remix-run/remix/issues/184\n // https://html.spec.whatwg.org/commit-snapshots/cb4f5ff75de5f4cbd7013c4abad02f21c77d4d1c/#attr-link-imagesrcset\n if (object.href == null) {\n return object.rel === \"preload\" && (typeof object.imageSrcSet === \"string\" || typeof object.imagesrcset === \"string\") && (typeof object.imageSizes === \"string\" || typeof object.imagesizes === \"string\");\n }\n return typeof object.rel === \"string\" && typeof object.href === \"string\";\n}\nasync function getStylesheetPrefetchLinks(matches, manifest, routeModules) {\n let links = await Promise.all(matches.map(async match => {\n let mod = await loadRouteModule(manifest.routes[match.route.id], routeModules);\n return mod.links ? mod.links() : [];\n }));\n return links.flat(1).filter(isHtmlLinkDescriptor).filter(link => link.rel === \"stylesheet\" || link.rel === \"preload\").map(link => link.rel === \"preload\" ? {\n ...link,\n rel: \"prefetch\"\n } : {\n ...link,\n rel: \"prefetch\",\n as: \"style\"\n });\n}\n\n// This is ridiculously identical to transition.ts `filterMatchesToLoad`\nfunction getNewMatchesForLinks(page, nextMatches, currentMatches, manifest, location, mode) {\n let path = parsePathPatch(page);\n let isNew = (match, index) => {\n if (!currentMatches[index]) return true;\n return match.route.id !== currentMatches[index].route.id;\n };\n let matchPathChanged = (match, index) => {\n var _currentMatches$index;\n return (\n // param change, /users/123 -> /users/456\n currentMatches[index].pathname !== match.pathname ||\n // splat param changed, which is not present in match.path\n // e.g. /files/images/avatar.jpg -> files/finances.xls\n ((_currentMatches$index = currentMatches[index].route.path) === null || _currentMatches$index === void 0 ? void 0 : _currentMatches$index.endsWith(\"*\")) && currentMatches[index].params[\"*\"] !== match.params[\"*\"]\n );\n };\n\n // NOTE: keep this mostly up-to-date w/ the transition data diff, but this\n // version doesn't care about submissions\n let newMatches = mode === \"data\" && location.search !== path.search ?\n // this is really similar to stuff in transition.ts, maybe somebody smarter\n // than me (or in less of a hurry) can share some of it. You're the best.\n nextMatches.filter((match, index) => {\n let manifestRoute = manifest.routes[match.route.id];\n if (!manifestRoute.hasLoader) {\n return false;\n }\n if (isNew(match, index) || matchPathChanged(match, index)) {\n return true;\n }\n if (match.route.shouldRevalidate) {\n var _currentMatches$;\n let routeChoice = match.route.shouldRevalidate({\n currentUrl: new URL(location.pathname + location.search + location.hash, window.origin),\n currentParams: ((_currentMatches$ = currentMatches[0]) === null || _currentMatches$ === void 0 ? void 0 : _currentMatches$.params) || {},\n nextUrl: new URL(page, window.origin),\n nextParams: match.params,\n defaultShouldRevalidate: true\n });\n if (typeof routeChoice === \"boolean\") {\n return routeChoice;\n }\n }\n return true;\n }) : nextMatches.filter((match, index) => {\n let manifestRoute = manifest.routes[match.route.id];\n return (mode === \"assets\" || manifestRoute.hasLoader) && (isNew(match, index) || matchPathChanged(match, index));\n });\n return newMatches;\n}\nfunction getDataLinkHrefs(page, matches, manifest) {\n let path = parsePathPatch(page);\n return dedupeHrefs(matches.filter(match => manifest.routes[match.route.id].hasLoader).map(match => {\n let {\n pathname,\n search\n } = path;\n let searchParams = new URLSearchParams(search);\n searchParams.set(\"_data\", match.route.id);\n return `${pathname}?${searchParams}`;\n }));\n}\nfunction getModuleLinkHrefs(matches, manifestPatch) {\n return dedupeHrefs(matches.map(match => {\n let route = manifestPatch.routes[match.route.id];\n let hrefs = [route.module];\n if (route.imports) {\n hrefs = hrefs.concat(route.imports);\n }\n return hrefs;\n }).flat(1));\n}\n\n// The `<Script>` will render rel=modulepreload for the current page, we don't\n// need to include them in a page prefetch, this gives us the list to remove\n// while deduping.\nfunction getCurrentPageModulePreloadHrefs(matches, manifest) {\n return dedupeHrefs(matches.map(match => {\n let route = manifest.routes[match.route.id];\n let hrefs = [route.module];\n if (route.imports) {\n hrefs = hrefs.concat(route.imports);\n }\n return hrefs;\n }).flat(1));\n}\nfunction dedupeHrefs(hrefs) {\n return [...new Set(hrefs)];\n}\nfunction dedupe(descriptors, preloads) {\n let set = new Set();\n let preloadsSet = new Set(preloads);\n return descriptors.reduce((deduped, descriptor) => {\n let alreadyModulePreload = !isPageLinkDescriptor(descriptor) && descriptor.as === \"script\" && descriptor.href && preloadsSet.has(descriptor.href);\n if (alreadyModulePreload) {\n return deduped;\n }\n let str = JSON.stringify(descriptor);\n if (!set.has(str)) {\n set.add(str);\n deduped.push(descriptor);\n }\n return deduped;\n }, []);\n}\n\n// https://github.com/remix-run/history/issues/897\nfunction parsePathPatch(href) {\n let path = parsePath(href);\n if (path.search === undefined) path.search = \"\";\n return path;\n}\n\nexport { dedupe, getDataLinkHrefs, getLinksForMatches, getModuleLinkHrefs, getNewMatchesForLinks, getStylesheetPrefetchLinks, isHtmlLinkDescriptor, isPageLinkDescriptor, prefetchStyleLinks };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\n/**\n * A React component that is rendered when the server throws a Response.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/catch-boundary\n */\n\n/**\n * A React component that is rendered when there is an error on a route.\n *\n * @deprecated Please enable the v2_errorBoundary flag\n *\n * @see https://remix.run/route/error-boundary\n */\n\n/**\n * V2 version of the ErrorBoundary that eliminates the distinction between\n * Error and Catch Boundaries and behaves like RR 6.4 errorElement and captures\n * errors with useRouteError()\n */\n\n/**\n * A function that defines `<link>` tags to be inserted into the `<head>` of\n * the document on route transitions.\n *\n * @see https://remix.run/route/meta\n */\n\n/**\n * A function that returns an object of name + content pairs to use for\n * `<meta>` tags for a route. These tags will be merged with (and take\n * precedence over) tags from parent routes.\n *\n * @see https://remix.run/route/meta\n */\n\n// TODO: Replace in v2\n\n/**\n * A name/content pair used to render `<meta>` tags in a meta function for a\n * route. The value can be either a string, which will render a single `<meta>`\n * tag, or an array of strings that will render multiple tags with the same\n * `name` attribute.\n */\n\n// TODO: Replace in v2\n\n/**\n * A React component that is rendered for a route.\n */\n\n/**\n * An arbitrary object that is associated with a route.\n *\n * @see https://remix.run/route/handle\n */\n\nasync function loadRouteModule(route, routeModulesCache) {\n if (route.id in routeModulesCache) {\n return routeModulesCache[route.id];\n }\n try {\n let routeModule = await import( /* webpackIgnore: true */route.module);\n routeModulesCache[route.id] = routeModule;\n return routeModule;\n } catch (error) {\n // User got caught in the middle of a deploy and the CDN no longer has the\n // asset we're trying to import! Reload from the server and the user\n // (should) get the new manifest--unless the developer purged the static\n // assets, the manifest path, but not the documents 😬\n window.location.reload();\n return new Promise(() => {\n // check out of this hook cause the DJs never gonna re[s]olve this\n });\n }\n}\n\n/**\n * @deprecated The `unstable_shouldReload` function has been removed, so this\n * function will never run and route data will be revalidated on every request.\n * Please update the function name to `shouldRevalidate` and use the\n * `ShouldRevalidateFunction` interface.\n */\n\nexport { loadRouteModule };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport { AbortedDeferredError, UNSAFE_DeferredData } from '@remix-run/router';\n\n/**\n * Data for a route that was returned from a `loader()`.\n *\n * Note: This moves to unknown in ReactRouter and eventually likely in Remix\n */\n\nfunction isCatchResponse(response) {\n return response.headers.get(\"X-Remix-Catch\") != null;\n}\nfunction isErrorResponse(response) {\n return response.headers.get(\"X-Remix-Error\") != null;\n}\nfunction isRedirectResponse(response) {\n return response.headers.get(\"X-Remix-Redirect\") != null;\n}\nfunction isDeferredResponse(response) {\n var _response$headers$get;\n return !!((_response$headers$get = response.headers.get(\"Content-Type\")) !== null && _response$headers$get !== void 0 && _response$headers$get.match(/text\\/remix-deferred/));\n}\nasync function fetchData(request, routeId, retry = 0) {\n let url = new URL(request.url);\n url.searchParams.set(\"_data\", routeId);\n let init = {\n signal: request.signal\n };\n if (request.method !== \"GET\") {\n init.method = request.method;\n let contentType = request.headers.get(\"Content-Type\");\n\n // Check between word boundaries instead of startsWith() due to the last\n // paragraph of https://httpwg.org/specs/rfc9110.html#field.content-type\n if (contentType && /\\bapplication\\/json\\b/.test(contentType)) {\n init.headers = {\n \"Content-Type\": contentType\n };\n init.body = JSON.stringify(await request.json());\n } else if (contentType && /\\btext\\/plain\\b/.test(contentType)) {\n init.headers = {\n \"Content-Type\": contentType\n };\n init.body = await request.text();\n } else if (contentType && /\\bapplication\\/x-www-form-urlencoded\\b/.test(contentType)) {\n init.body = new URLSearchParams(await request.text());\n } else {\n init.body = await request.formData();\n }\n }\n if (retry > 0) {\n // Retry up to 3 times waiting 50, 250, 1250 ms\n // between retries for a total of 1550 ms before giving up.\n await new Promise(resolve => setTimeout(resolve, 5 ** retry * 10));\n }\n let revalidation = window.__remixRevalidation;\n let response = await fetch(url.href, init).catch(error => {\n if (typeof revalidation === \"number\" && revalidation === window.__remixRevalidation && (error === null || error === void 0 ? void 0 : error.name) === \"TypeError\" && retry < 3) {\n return fetchData(request, routeId, retry + 1);\n }\n throw error;\n });\n if (isErrorResponse(response)) {\n let data = await response.json();\n let error = new Error(data.message);\n error.stack = data.stack;\n return error;\n }\n return response;\n}\nconst DEFERRED_VALUE_PLACEHOLDER_PREFIX = \"__deferred_promise:\";\nasync function parseDeferredReadableStream(stream) {\n if (!stream) {\n throw new Error(\"parseDeferredReadableStream requires stream argument\");\n }\n let deferredData;\n let deferredResolvers = {};\n try {\n let sectionReader = readStreamSections(stream);\n\n // Read the first section to get the critical data\n let initialSectionResult = await sectionReader.next();\n let initialSection = initialSectionResult.value;\n if (!initialSection) throw new Error(\"no critical data\");\n let criticalData = JSON.parse(initialSection);\n\n // Setup deferred data and resolvers for later based on the critical data\n if (typeof criticalData === \"object\" && criticalData !== null) {\n for (let [eventKey, value] of Object.entries(criticalData)) {\n if (typeof value !== \"string\" || !value.startsWith(DEFERRED_VALUE_PLACEHOLDER_PREFIX)) {\n continue;\n }\n deferredData = deferredData || {};\n deferredData[eventKey] = new Promise((resolve, reject) => {\n deferredResolvers[eventKey] = {\n resolve: value => {\n resolve(value);\n delete deferredResolvers[eventKey];\n },\n reject: error => {\n reject(error);\n delete deferredResolvers[eventKey];\n }\n };\n });\n }\n }\n\n // Read the rest of the stream and resolve deferred promises\n (async () => {\n try {\n for await (let section of sectionReader) {\n // Determine event type and data\n let [event, ...sectionDataStrings] = section.split(\":\");\n let sectionDataString = sectionDataStrings.join(\":\");\n let data = JSON.parse(sectionDataString);\n if (event === \"data\") {\n for (let [key, value] of Object.entries(data)) {\n if (deferredResolvers[key]) {\n deferredResolvers[key].resolve(value);\n }\n }\n } else if (event === \"error\") {\n for (let [key, value] of Object.entries(data)) {\n let err = new Error(value.message);\n err.stack = value.stack;\n if (deferredResolvers[key]) {\n deferredResolvers[key].reject(err);\n }\n }\n }\n }\n for (let [key, resolver] of Object.entries(deferredResolvers)) {\n resolver.reject(new AbortedDeferredError(`Deferred ${key} will never be resolved`));\n }\n } catch (error) {\n // Reject any existing deferred promises if something blows up\n for (let resolver of Object.values(deferredResolvers)) {\n resolver.reject(error);\n }\n }\n })();\n return new UNSAFE_DeferredData({\n ...criticalData,\n ...deferredData\n });\n } catch (error) {\n for (let resolver of Object.values(deferredResolvers)) {\n resolver.reject(error);\n }\n throw error;\n }\n}\nasync function* readStreamSections(stream) {\n let reader = stream.getReader();\n let buffer = [];\n let sections = [];\n let closed = false;\n let encoder = new TextEncoder();\n let decoder = new TextDecoder();\n let readStreamSection = async () => {\n if (sections.length > 0) return sections.shift();\n\n // Read from the stream until we have at least one complete section to process\n while (!closed && sections.length === 0) {\n let chunk = await reader.read();\n if (chunk.done) {\n closed = true;\n break;\n }\n // Buffer the raw chunks\n buffer.push(chunk.value);\n try {\n // Attempt to split off a section from the buffer\n let bufferedString = decoder.decode(mergeArrays(...buffer));\n let splitSections = bufferedString.split(\"\\n\\n\");\n if (splitSections.length >= 2) {\n // We have a complete section, so add it to the sections array\n sections.push(...splitSections.slice(0, -1));\n // Remove the section from the buffer and store the rest for future processing\n buffer = [encoder.encode(splitSections.slice(-1).join(\"\\n\\n\"))];\n }\n\n // If we successfully parsed at least one section, break out of reading the stream\n // to allow upstream processing of the processable sections\n if (sections.length > 0) {\n break;\n }\n } catch {\n // If we failed to parse the buffer it was because we failed to decode the stream\n // because we are missing bytes that we haven't yet received, so continue reading\n // from the stream until we have a complete section\n continue;\n }\n }\n\n // If we have a complete section, return it\n if (sections.length > 0) {\n return sections.shift();\n }\n\n // If we have no complete section, but we have no more chunks to process,\n // split those sections and clear out the buffer as there is no more data\n // to process. If this errors, let it bubble up as the stream ended\n // without valid data\n if (buffer.length > 0) {\n let bufferedString = decoder.decode(mergeArrays(...buffer));\n sections = bufferedString.split(\"\\n\\n\").filter(s => s);\n buffer = [];\n }\n\n // Return any remaining sections that have been processed\n return sections.shift();\n };\n let section = await readStreamSection();\n while (section) {\n yield section;\n section = await readStreamSection();\n }\n}\nfunction mergeArrays(...arrays) {\n let out = new Uint8Array(arrays.reduce((total, arr) => total + arr.length, 0));\n let offset = 0;\n for (let arr of arrays) {\n out.set(arr, offset);\n offset += arr.length;\n }\n return out;\n}\n\nexport { fetchData, isCatchResponse, isDeferredResponse, isErrorResponse, isRedirectResponse, parseDeferredReadableStream };\n","/**\n * @remix-run/react v1.18.1\n *\n * Copyright (c) Remix Software Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE.md file in the root directory of this source tree.\n *\n * @license MIT\n */\nimport * as React from 'react';\nimport { redirect } from 'react-router-dom';\nimport { loadRouteModule } from './routeModules.js';\nimport { fetchData, isRedirectResponse, isCatchResponse, isDeferredResponse, parseDeferredReadableStream } from './data.js';\nimport { prefetchStyleLinks } from './links.js';\nimport invariant from './invariant.js';\nimport { RemixRoute, RemixRouteError } from './components.js';\n\n// NOTE: make sure to change the Route in server-runtime if you change this\n\n// NOTE: make sure to change the EntryRoute in server-runtime if you change this\n\n// Create a map of routes by parentId to use recursively instead of\n// repeatedly filtering the manifest.\nfunction groupRoutesByParentId(manifest) {\n let routes = {};\n Object.values(manifest).forEach(route => {\n let parentId = route.parentId || \"\";\n if (!routes[parentId]) {\n routes[parentId] = [];\n }\n routes[parentId].push(route);\n });\n return routes;\n}\nfunction createServerRoutes(manifest, routeModules, future, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest)) {\n return (routesByParentId[parentId] || []).map(route => {\n let hasErrorBoundary = future.v2_errorBoundary === true ? route.id === \"root\" || route.hasErrorBoundary : route.id === \"root\" || route.hasCatchBoundary || route.hasErrorBoundary;\n let dataRoute = {\n caseSensitive: route.caseSensitive,\n element: /*#__PURE__*/React.createElement(RemixRoute, {\n id: route.id\n }),\n errorElement: hasErrorBoundary ? /*#__PURE__*/React.createElement(RemixRouteError, {\n id: route.id\n }) : undefined,\n id: route.id,\n index: route.index,\n path: route.path,\n handle: routeModules[route.id].handle\n // Note: we don't need loader/action/shouldRevalidate on these routes\n // since they're for a static render\n };\n\n let children = createServerRoutes(manifest, routeModules, future, route.id, routesByParentId);\n if (children.length > 0) dataRoute.children = children;\n return dataRoute;\n });\n}\nfunction createClientRoutesWithHMRRevalidationOptOut(needsRevalidation, manifest, routeModulesCache, future) {\n return createClientRoutes(manifest, routeModulesCache, future, \"\", groupRoutesByParentId(manifest), needsRevalidation);\n}\nfunction createClientRoutes(manifest, routeModulesCache, future, parentId = \"\", routesByParentId = groupRoutesByParentId(manifest), needsRevalidation) {\n return (routesByParentId[parentId] || []).map(route => {\n let hasErrorBoundary = future.v2_errorBoundary === true ? route.id === \"root\" || route.hasErrorBoundary : route.id === \"root\" || route.hasCatchBoundary || route.hasErrorBoundary;\n let dataRoute = {\n caseSensitive: route.caseSensitive,\n element: /*#__PURE__*/React.createElement(RemixRoute, {\n id: route.id\n }),\n errorElement: hasErrorBoundary ? /*#__PURE__*/React.createElement(RemixRouteError, {\n id: route.id\n }) : undefined,\n id: route.id,\n index: route.index,\n path: route.path,\n // handle gets added in via useMatches since we aren't guaranteed to\n // have the route module available here\n handle: undefined,\n loader: createDataFunction(route, routeModulesCache, false),\n action: createDataFunction(route, routeModulesCache, true),\n shouldRevalidate: createShouldRevalidate(route, routeModulesCache, needsRevalidation)\n };\n let children = createClientRoutes(manifest, routeModulesCache, future, route.id, routesByParentId, needsRevalidation);\n if (children.length > 0) dataRoute.children = children;\n return dataRoute;\n });\n}\nfunction createShouldRevalidate(route, routeModules, needsRevalidation) {\n let handledRevalidation = false;\n return function (arg) {\n let module = routeModules[route.id];\n invariant(module, `Expected route module to be loaded for ${route.id}`);\n\n // When an HMR / HDR update happens we opt out of all user-defined\n // revalidation logic and the do as the dev server tells us the first\n // time router.revalidate() is called.\n if (needsRevalidation !== undefined && !handledRevalidation) {\n handledRevalidation = true;\n return needsRevalidation.has(route.id);\n }\n if (module.shouldRevalidate) {\n return module.shouldRevalidate(arg);\n }\n return arg.defaultShouldRevalidate;\n };\n}\nasync function loadRouteModuleWithBlockingLinks(route, routeModules) {\n let routeModule = await loadRouteModule(route, routeModules);\n await prefetchStyleLinks(routeModule);\n return routeModule;\n}\nfunction createDataFunction(route, routeModules, isAction) {\n return async ({\n request\n }) => {\n let routeModulePromise = loadRouteModuleWithBlockingLinks(route, routeModules);\n try {\n if (isAction && !route.hasAction) {\n let msg = `Route \"${route.id}\" does not have an action, but you are trying ` + `to submit to it. To fix this, please add an \\`action\\` function to the route`;\n console.error(msg);\n throw new Error(msg);\n } else if (!isAction && !route.hasLoader) {\n return null;\n }\n let result = await fetchData(request, route.id);\n if (result instanceof Error) {\n throw result;\n }\n if (isRedirectResponse(result)) {\n throw getRedirect(result);\n }\n if (isCatchResponse(result)) {\n throw result;\n }\n if (isDeferredResponse(result) && result.body) {\n return await parseDeferredReadableStream(result.body);\n }\n return result;\n } finally {\n await routeModulePromise;\n }\n };\n}\nfunction getRedirect(response) {\n let status = parseInt(response.headers.get(\"X-Remix-Status\"), 10) || 302;\n let url = response.headers.get(\"X-Remix-Redirect\");\n let headers = {};\n let revalidate = response.headers.get(\"X-Remix-Revalidate\");\n if (revalidate) {\n headers[\"X-Remix-Revalidate\"] = revalidate;\n }\n return redirect(url, {\n status,\n headers\n });\n}\n\nexport { createClientRoutes, createClientRoutesWithHMRRevalidationOptOut, createServerRoutes };\n"],"sourceRoot":""}