{"version":3,"sources":["webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/ab-test.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/crawler.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/csp-scripts.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/i18n-text.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/index.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/locale.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/render-config.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/root-traffic.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/user-agent.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/@lemon8+web-app-shared@1.2.4_@types+react@18.2.79/node_modules/@lemon8/web-app-shared/dist/esm/atom/web-user.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../common/temp/split__lemon8_web_seo/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-seo/../dom.ts","webpack://@lemon8/web-seo/../index.tsx","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/array-species-constructor.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/array-species-create.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/internals/flatten-into-array.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/modules/es.array.flat.js","webpack://@lemon8/web-seo/../common/temp/split__lemon8_web_seo/node_modules/.pnpm/core-js@3.23.5/node_modules/core-js/modules/es.array.unscopables.flat.js","webpack://@lemon8/web-seo/javascript/common/temp/split__lemon8_web_seo/node_modules/.pnpm/@babel+runtime@7.15.4/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://@lemon8/web-seo/javascript/common/temp/split__lemon8_web_seo/node_modules/.pnpm/@babel+runtime@7.15.4/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js"],"names":["exports","jotai_1","CrawlerType","GoogleCrawlerSubType","__createBinding","o","m","k","k2","desc","__exportStar","p","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","ESCAPE_LOOKUP","ESCAPE_REGEX","escapeHtml","html","replace","match","createHtml","__html","IDLE_TRANSITION","state","submission","undefined","location","type","IDLE_FETCHER","data","formMethod","formAction","formEncType","formData","json","text","alreadyWarned","logDeprecationOnce","message","useDataRouterContext","context","React","UNSAFE_DataRouterContext","invariant","useDataRouterStateContext","UNSAFE_DataRouterStateContext","RemixContext","displayName","useRemixContext","RemixRoute","_ref","id","routeModules","future","default","Component","ErrorBoundary","CatchBoundary","v2_errorBoundary","Outlet","concat","RemixRouteError","_ref2","error","useRouteError","V2_RemixRootDefaultErrorBoundary","RemixRootDefaultCatchBoundary","RemixRootDefaultErrorBoundary","isRouteErrorResponse","tError","status","RemixCatchBoundary","catch","component","Error","usePrefetchBehavior","prefetch","theirElementProps","maybePrefetch","setMaybePrefetch","shouldPrefetch","setShouldPrefetch","onFocus","onBlur","onMouseEnter","onMouseLeave","onTouchStart","ref","callback","entries","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","manifest","errors","matches","routerMatches","slice","findIndex","route","links","getLinksForMatches","some","link","map","isPageLinkDescriptor","imageSrcSet","imagesrcset","imagesizes","imageSizes","rel","_ref5","dataLinkProps","_excluded3","router","matchRoutes","routes","PrefetchPageLinksImpl","console","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","value","includes","charSet","String","isOpenGraphTag","flat","content","property","JSON","stringify","V2Meta","_matches","leafMeta","_match","pathname","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","stack","_data","routeModulesScript","hmr","runtime","url","index","module","suppressHydrationWarning","async","__remixContext","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","window","origin","search","URLSearchParams","toString","useFetchers","useFetchers$1","f","fetcher","convertRouterFetcherToRemixFetcher","addFetcherDeprecationWarnings","useFetcher","fetcherRR","useFetcher$1","remixFetcher","fetcherWithComponents","_objectSpread","load","submit","Form","defineProperty","get","set","configurable","enumerable","LiveReload","_len","refs","_key","RemixErrorBoundary","React__default","constructor","getDerivedStateFromError","getDerivedStateFromProps","render","lang","style","fontFamily","padding","fontSize","background","color","overflow","RemixRootDefaultCatchBoundaryImpl","caught","errorString","RemixCatchContext","useCatch","useContext","catchVal","Provider","statusText","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","reload","defaultMethod","defaultEncType","isHtmlElement","isButtonElement","toLowerCase","isFormElement","isInputElement","isModifiedEvent","metaKey","altKey","ctrlKey","shiftKey","shouldProcessLinkClick","button","createSearchParams","init","keys","memo","v","getSearchParamsForLocation","locationSearch","defaultSearchParams","getAll","append","_formDataSupportsSubmitter","isFormDataSubmitterSupported","FormData","e","supportedFormEncTypes","getFormEncType","getFormSubmissionInfo","basename","body","attr","getAttribute","stripBasename","form","prefix","createBrowserRouter","opts","createRouter","v7_prependBasename","history","createBrowserHistory","hydrationData","parseHydrationData","mapRouteProperties","initialize","createHashRouter","createHashHistory","_window","__staticRouterHydrationData","deserializeErrors","serialized","val","__type","ErrorResponse","internal","START_TRANSITION","startTransitionImpl","BrowserRouter","historyRef","v5Compat","setStateImpl","v7_startTransition","setState","newState","listen","Router","navigationType","navigator","HashRouter","HistoryRouter","isBrowser","onClick","relative","reloadDocument","preventScrollReset","rest","_objectWithoutPropertiesLoose","NavigationContext","absoluteHref","isExternal","targetUrl","startsWith","protocol","internalOnClick","useLinkClickHandler","handleClick","ariaCurrentProp","caseSensitive","className","classNameProp","end","styleProp","useResolvedPath","routerState","DataRouterStateContext","toPathname","encodeLocation","locationPathname","nextLocationPathname","isActive","charAt","isPending","ariaCurrent","Boolean","useSubmit","FormImpl","onSubmit","useFormAction","submitHandler","preventDefault","submitter","nativeEvent","submitMethod","currentTarget","ScrollRestoration","getKey","storageKey","useScrollRestoration","DataRouterHook","DataRouterStateHook","getDataRouterConsoleError","hookName","ctx","DataRouterContext","useDataRouterState","_temp","replaceProp","navigate","useNavigate","createPath","useSearchParams","defaultInit","defaultSearchParamsRef","hasSetSearchParamsRef","setSearchParams","nextInit","navigateOptions","newSearchParams","validateClientSideSubmission","UseSubmit","currentRouteId","useRouteId","options","fromRouteId","useSubmitFetcher","fetcherKey","fetcherRouteId","UseSubmitFetcher","fetch","_temp2","routeContext","RouteContext","delete","joinPaths","createFetcherForm","fetcherId","_route$matches","UseFetcher","getFetcher","deleteFetcher","UseFetchers","fetchers","values","SCROLL_RESTORATION_STORAGE_KEY","savedScrollPositions","_temp3","UseScrollRestoration","restoreScrollPosition","scrollRestoration","usePageHide","scrollY","sessionStorage","setItem","sessionPositions","getItem","parse","getKeyWithoutBasename","disableScrollRestoration","enableScrollRestoration","scrollTo","el","getElementById","scrollIntoView","useBeforeUnload","capture","addEventListener","removeEventListener","usePrompt","when","blocker","useBlocker","reset","confirm","proceed","isConstructor","isObject","wellKnownSymbol","SPECIES","$Array","originalArray","C","arraySpeciesConstructor","lengthOfArrayLike","doesNotExceedSafeInteger","flattenIntoArray","original","sourceLen","start","depth","mapper","thisArg","targetIndex","sourceIndex","mapFn","element","elementLen","$","toObject","toIntegerOrInfinity","arraySpeciesCreate","depthArg","O","A","addToUnscopables","excluded","sourceKeys","sourceSymbolKeys"],"mappings":"uDACA,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAE,EAC7DA,EAAQ,QAAU,OAClB,MAAMC,EAAU,EAAQ,KAAO,EAC/BD,EAAQ,S,EAAcC,EAAQ,MAAM,CAChC,SAAU,GACV,WAAY,CAAC,CACjB,CAAC,EACDD,EAAQ,QAAQ,WAAa,S,kBCP7B,OAAO,eAAeA,EAAS,aAAc,CAAE,MAAO,EAAK,CAAE,EAC7DA,EAAQ,SAAWA,EAAQ,qBAAuBA,EAAQ,YAAc,OACxE,MAAMC,EAAU,EAAQ,KAAO,EAC/B,IAAIC,GACH,SAAUA,EAAa,CACpBA,EAAY,OAAY,QAC5B,GAAGA,EAAcF,EAAQ,cAAgBA,EAAQ,YAAc,CAAC,EAAE,EAClE,IAAIG,GACH,SAAUA,EAAsB,CAC7BA,EAAqB,WAAgB,cACrCA,EAAqB,OAAY,UACjCA,EAAqB,QAAa,gBAClCA,EAAqB,MAAW,QAChCA,EAAqB,KAAU,OAC/BA,EAAqB,MAAW,QAChCA,EAAqB,UAAe,YACpCA,EAAqB,iBAAsB,oBAC3CA,EAAqB,YAAiB,eACtCA,EAAqB,UAAe,aACpCA,EAAqB,QAAa,UAClCA,EAAqB,SAAc,YACnCA,EAAqB,iBAAsB,mBAC/C,GAAGA,EAAuBH,EAAQ,uBAAyBA,EAAQ,qBAAuB,CAAC,EAAE,EAC7FA,EAAQ,U,EAAeC,EAAQ,MAAM,CAAC,CAAC,EACvCD,EAAQ,SAAS,WAAa,U,kBCxB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nB,GACnB,EAAA8mB,EAAS,QAAQ1mB,CAAG,GAAK,KACzB,CAAC,OAAO,UAAU,qBAAqB,KAAKD,EAAQC,CAAG,IAC3DL,EAAOK,GAAOD,EAAOC,IAEzB,CAEA,OAAOL,CACT,C","file":"261-53b843b093bc7eec933e.js","sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$ABTest = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$ABTest = (0, jotai_1.atom)({\n versions: '',\n parameters: {},\n});\nexports.$ABTest.debugLabel = '$ABTest';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$Crawler = exports.GoogleCrawlerSubType = exports.CrawlerType = void 0;\nconst jotai_1 = require(\"jotai\");\nvar CrawlerType;\n(function (CrawlerType) {\n CrawlerType[\"Google\"] = \"google\";\n})(CrawlerType = exports.CrawlerType || (exports.CrawlerType = {}));\nvar GoogleCrawlerSubType;\n(function (GoogleCrawlerSubType) {\n GoogleCrawlerSubType[\"GoogleAPIs\"] = \"google_apis\";\n GoogleCrawlerSubType[\"AdsBot\"] = \"ads_bot\";\n GoogleCrawlerSubType[\"AdSense\"] = \"mediapartners\";\n GoogleCrawlerSubType[\"Image\"] = \"image\";\n GoogleCrawlerSubType[\"News\"] = \"news\";\n GoogleCrawlerSubType[\"Video\"] = \"video\";\n GoogleCrawlerSubType[\"GoogleBot\"] = \"googlebot\";\n GoogleCrawlerSubType[\"GoogleBot$Mobile\"] = \"googlebot(mobile)\";\n GoogleCrawlerSubType[\"FeedFetcher\"] = \"feed_fetcher\";\n GoogleCrawlerSubType[\"ReadAloud\"] = \"read_aloud\";\n GoogleCrawlerSubType[\"Favicon\"] = \"favicon\";\n GoogleCrawlerSubType[\"Storebot\"] = \"store_bot\";\n GoogleCrawlerSubType[\"SiteVerification\"] = \"site_verification\";\n})(GoogleCrawlerSubType = exports.GoogleCrawlerSubType || (exports.GoogleCrawlerSubType = {}));\nexports.$Crawler = (0, jotai_1.atom)({});\nexports.$Crawler.debugLabel = '$Crawler';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$CSPScripts = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$CSPScripts = (0, jotai_1.atom)({\n 'tea-precollect': '',\n 'slardar-precollect': '',\n 'remix-route-modules': '',\n 'remix-server-handoff': '',\n});\nexports.$CSPScripts.debugLabel = '$CSPScripts';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$I18nText = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$I18nText = (0, jotai_1.atom)({});\nexports.$I18nText.debugLabel = '$I18nText';\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./ab-test\"), exports);\n__exportStar(require(\"./crawler\"), exports);\n__exportStar(require(\"./i18n-text\"), exports);\n__exportStar(require(\"./locale\"), exports);\n__exportStar(require(\"./render-config\"), exports);\n__exportStar(require(\"./root-traffic\"), exports);\n__exportStar(require(\"./user-agent\"), exports);\n__exportStar(require(\"./web-user\"), exports);\n__exportStar(require(\"./csp-scripts\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$Locale = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$Locale = (0, jotai_1.atom)({});\nexports.$Locale.debugLabel = '$Locale';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$RenderConfig = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$RenderConfig = (0, jotai_1.atom)({\n enableStreamingSSR: false,\n disableInlineScripts: false,\n});\nexports.$RenderConfig.debugLabel = '$RenderConfig';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$RootTraffic = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$RootTraffic = (0, jotai_1.atom)({});\nexports.$RootTraffic.debugLabel = '$RootTraffic';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$UserAgent = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$UserAgent = (0, jotai_1.atom)({\n isMobile: false,\n isBot: false,\n isiOS: false,\n isSafari: false,\n isInApp: false,\n isMacOS: false,\n});\nexports.$UserAgent.debugLabel = '$UserAgent';\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.$WebUser = void 0;\nconst jotai_1 = require(\"jotai\");\nexports.$WebUser = (0, jotai_1.atom)({\n webId: '',\n});\nexports.$WebUser.debugLabel = '$WebUser';\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 _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 */\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","import type {\n FormEncType,\n HTMLFormMethod,\n RelativeRoutingType,\n} from \"@remix-run/router\";\nimport { stripBasename, UNSAFE_warning as warning } from \"@remix-run/router\";\n\nexport const defaultMethod: HTMLFormMethod = \"get\";\nconst defaultEncType: FormEncType = \"application/x-www-form-urlencoded\";\n\nexport function isHtmlElement(object: any): object is HTMLElement {\n return object != null && typeof object.tagName === \"string\";\n}\n\nexport function isButtonElement(object: any): object is HTMLButtonElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"button\";\n}\n\nexport function isFormElement(object: any): object is HTMLFormElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"form\";\n}\n\nexport function isInputElement(object: any): object is HTMLInputElement {\n return isHtmlElement(object) && object.tagName.toLowerCase() === \"input\";\n}\n\ntype LimitedMouseEvent = Pick<\n MouseEvent,\n \"button\" | \"metaKey\" | \"altKey\" | \"ctrlKey\" | \"shiftKey\"\n>;\n\nfunction isModifiedEvent(event: LimitedMouseEvent) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n}\n\nexport function shouldProcessLinkClick(\n event: LimitedMouseEvent,\n target?: string\n) {\n return (\n event.button === 0 && // Ignore everything but left clicks\n (!target || target === \"_self\") && // Let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // Ignore clicks with modifier keys\n );\n}\n\nexport type ParamKeyValuePair = [string, string];\n\nexport type URLSearchParamsInit =\n | string\n | ParamKeyValuePair[]\n | Record<string, string | string[]>\n | URLSearchParams;\n\n/**\n * Creates a URLSearchParams object using the given initializer.\n *\n * This is identical to `new URLSearchParams(init)` except it also\n * supports arrays as values in the object form of the initializer\n * instead of just strings. This is convenient when you need multiple\n * values for a given key, but don't want to use an array initializer.\n *\n * For example, instead of:\n *\n * let searchParams = new URLSearchParams([\n * ['sort', 'name'],\n * ['sort', 'price']\n * ]);\n *\n * you can do:\n *\n * let searchParams = createSearchParams({\n * sort: ['name', 'price']\n * });\n */\nexport function createSearchParams(\n init: URLSearchParamsInit = \"\"\n): URLSearchParams {\n return new URLSearchParams(\n typeof init === \"string\" ||\n Array.isArray(init) ||\n init instanceof URLSearchParams\n ? init\n : Object.keys(init).reduce((memo, key) => {\n let value = init[key];\n return memo.concat(\n Array.isArray(value) ? value.map((v) => [key, v]) : [[key, value]]\n );\n }, [] as ParamKeyValuePair[])\n );\n}\n\nexport function getSearchParamsForLocation(\n locationSearch: string,\n defaultSearchParams: URLSearchParams | null\n) {\n let searchParams = createSearchParams(locationSearch);\n\n if (defaultSearchParams) {\n for (let key of defaultSearchParams.keys()) {\n if (!searchParams.has(key)) {\n defaultSearchParams.getAll(key).forEach((value) => {\n searchParams.append(key, value);\n });\n }\n }\n }\n\n return searchParams;\n}\n\n// Thanks https://github.com/sindresorhus/type-fest!\ntype JsonObject = { [Key in string]: JsonValue } & {\n [Key in string]?: JsonValue | undefined;\n};\ntype JsonArray = JsonValue[] | readonly JsonValue[];\ntype JsonPrimitive = string | number | boolean | null;\ntype JsonValue = JsonPrimitive | JsonObject | JsonArray;\n\nexport type SubmitTarget =\n | HTMLFormElement\n | HTMLButtonElement\n | HTMLInputElement\n | FormData\n | URLSearchParams\n | JsonValue\n | null;\n\n// One-time check for submitter support\nlet _formDataSupportsSubmitter: boolean | null = null;\n\nfunction isFormDataSubmitterSupported() {\n if (_formDataSupportsSubmitter === null) {\n try {\n new FormData(\n document.createElement(\"form\"),\n // @ts-expect-error if FormData supports the submitter parameter, this will throw\n 0\n );\n _formDataSupportsSubmitter = false;\n } catch (e) {\n _formDataSupportsSubmitter = true;\n }\n }\n return _formDataSupportsSubmitter;\n}\n\nexport interface SubmitOptions {\n /**\n * The HTTP method used to submit the form. Overrides `<form method>`.\n * Defaults to \"GET\".\n */\n method?: HTMLFormMethod;\n\n /**\n * The action URL path used to submit the form. Overrides `<form action>`.\n * Defaults to the path of the current route.\n */\n action?: string;\n\n /**\n * The encoding used to submit the form. Overrides `<form encType>`.\n * Defaults to \"application/x-www-form-urlencoded\".\n */\n encType?: FormEncType;\n\n /**\n * Set `true` to replace the current entry in the browser's history stack\n * instead of creating a new one (i.e. stay on \"the same page\"). Defaults\n * to `false`.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * In browser-based environments, prevent resetting scroll after this\n * navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n}\n\nconst supportedFormEncTypes: Set<FormEncType> = new Set([\n \"application/x-www-form-urlencoded\",\n \"multipart/form-data\",\n \"text/plain\",\n]);\n\nfunction getFormEncType(encType: string | null) {\n if (encType != null && !supportedFormEncTypes.has(encType as FormEncType)) {\n warning(\n false,\n `\"${encType}\" is not a valid \\`encType\\` for \\`<Form>\\`/\\`<fetcher.Form>\\` ` +\n `and will default to \"${defaultEncType}\"`\n );\n\n return null;\n }\n return encType;\n}\n\nexport function getFormSubmissionInfo(\n target: SubmitTarget,\n basename: string\n): {\n action: string | null;\n method: string;\n encType: string;\n formData: FormData | undefined;\n body: any;\n} {\n let method: string;\n let action: string | null;\n let encType: string;\n let formData: FormData | undefined;\n let body: any;\n\n if (isFormElement(target)) {\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we'll\n // re-prefix in the router\n let attr = target.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n method = target.getAttribute(\"method\") || defaultMethod;\n encType = getFormEncType(target.getAttribute(\"enctype\")) || defaultEncType;\n\n formData = new FormData(target);\n } else if (\n isButtonElement(target) ||\n (isInputElement(target) &&\n (target.type === \"submit\" || target.type === \"image\"))\n ) {\n let form = target.form;\n\n if (form == null) {\n throw new Error(\n `Cannot submit a <button> or <input type=\"submit\"> without a <form>`\n );\n }\n\n // <button>/<input type=\"submit\"> may override attributes of <form>\n\n // When grabbing the action from the element, it will have had the basename\n // prefixed to ensure non-JS scenarios work, so strip it since we'll\n // re-prefix in the router\n let attr = target.getAttribute(\"formaction\") || form.getAttribute(\"action\");\n action = attr ? stripBasename(attr, basename) : null;\n\n method =\n target.getAttribute(\"formmethod\") ||\n form.getAttribute(\"method\") ||\n defaultMethod;\n encType =\n getFormEncType(target.getAttribute(\"formenctype\")) ||\n getFormEncType(form.getAttribute(\"enctype\")) ||\n defaultEncType;\n\n // Build a FormData object populated from a form and submitter\n formData = new FormData(form, target);\n\n // If this browser doesn't support the `FormData(el, submitter)` format,\n // then tack on the submitter value at the end. This is a lightweight\n // solution that is not 100% spec compliant. For complete support in older\n // browsers, consider using the `formdata-submitter-polyfill` package\n if (!isFormDataSubmitterSupported()) {\n let { name, type, value } = target;\n if (type === \"image\") {\n let prefix = name ? `${name}.` : \"\";\n formData.append(`${prefix}x`, \"0\");\n formData.append(`${prefix}y`, \"0\");\n } else if (name) {\n formData.append(name, value);\n }\n }\n } else if (isHtmlElement(target)) {\n throw new Error(\n `Cannot submit element that is not <form>, <button>, or ` +\n `<input type=\"submit|image\">`\n );\n } else {\n method = defaultMethod;\n action = null;\n encType = defaultEncType;\n body = target;\n }\n\n // Send body for <Form encType=\"text/plain\" so we encode it into text\n if (formData && encType === \"text/plain\") {\n body = formData;\n formData = undefined;\n }\n\n return { action, method: method.toLowerCase(), encType, formData, body };\n}\n","/**\n * NOTE: If you refactor this to split up the modules into separate files,\n * you'll need to update the rollup config for react-router-dom-v5-compat.\n */\nimport * as React from \"react\";\nimport type {\n FutureConfig,\n Location,\n NavigateOptions,\n NavigationType,\n RelativeRoutingType,\n RouteObject,\n To,\n} from \"react-router\";\nimport {\n Router,\n createPath,\n useHref,\n useLocation,\n useMatches,\n useNavigate,\n useNavigation,\n useResolvedPath,\n unstable_useBlocker as useBlocker,\n UNSAFE_DataRouterContext as DataRouterContext,\n UNSAFE_DataRouterStateContext as DataRouterStateContext,\n UNSAFE_NavigationContext as NavigationContext,\n UNSAFE_RouteContext as RouteContext,\n UNSAFE_mapRouteProperties as mapRouteProperties,\n UNSAFE_useRouteId as useRouteId,\n} from \"react-router\";\nimport type {\n BrowserHistory,\n Fetcher,\n FormEncType,\n FormMethod,\n FutureConfig as RouterFutureConfig,\n GetScrollRestorationKeyFunction,\n HashHistory,\n History,\n HTMLFormMethod,\n HydrationState,\n Router as RemixRouter,\n V7_FormMethod,\n} from \"@remix-run/router\";\nimport {\n createRouter,\n createBrowserHistory,\n createHashHistory,\n joinPaths,\n stripBasename,\n ErrorResponse,\n UNSAFE_invariant as invariant,\n UNSAFE_warning as warning,\n} from \"@remix-run/router\";\n\nimport type {\n SubmitOptions,\n ParamKeyValuePair,\n URLSearchParamsInit,\n SubmitTarget,\n} from \"./dom\";\nimport {\n createSearchParams,\n defaultMethod,\n getFormSubmissionInfo,\n getSearchParamsForLocation,\n shouldProcessLinkClick,\n} from \"./dom\";\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Re-exports\n////////////////////////////////////////////////////////////////////////////////\n\nexport type {\n FormEncType,\n FormMethod,\n GetScrollRestorationKeyFunction,\n ParamKeyValuePair,\n SubmitOptions,\n URLSearchParamsInit,\n V7_FormMethod,\n};\nexport { createSearchParams };\n\n// Note: Keep in sync with react-router exports!\nexport type {\n ActionFunction,\n ActionFunctionArgs,\n AwaitProps,\n unstable_Blocker,\n unstable_BlockerFunction,\n DataRouteMatch,\n DataRouteObject,\n Fetcher,\n Hash,\n IndexRouteObject,\n IndexRouteProps,\n JsonFunction,\n LazyRouteFunction,\n LayoutRouteProps,\n LoaderFunction,\n LoaderFunctionArgs,\n Location,\n MemoryRouterProps,\n NavigateFunction,\n NavigateOptions,\n NavigateProps,\n Navigation,\n Navigator,\n NonIndexRouteObject,\n OutletProps,\n Params,\n ParamParseKey,\n Path,\n PathMatch,\n Pathname,\n PathPattern,\n PathRouteProps,\n RedirectFunction,\n RelativeRoutingType,\n RouteMatch,\n RouteObject,\n RouteProps,\n RouterProps,\n RouterProviderProps,\n RoutesProps,\n Search,\n ShouldRevalidateFunction,\n To,\n} from \"react-router\";\nexport {\n AbortedDeferredError,\n Await,\n MemoryRouter,\n Navigate,\n NavigationType,\n Outlet,\n Route,\n Router,\n RouterProvider,\n Routes,\n createMemoryRouter,\n createPath,\n createRoutesFromChildren,\n createRoutesFromElements,\n defer,\n isRouteErrorResponse,\n generatePath,\n json,\n matchPath,\n matchRoutes,\n parsePath,\n redirect,\n renderMatches,\n resolvePath,\n useActionData,\n useAsyncError,\n useAsyncValue,\n unstable_useBlocker,\n useHref,\n useInRouterContext,\n useLoaderData,\n useLocation,\n useMatch,\n useMatches,\n useNavigate,\n useNavigation,\n useNavigationType,\n useOutlet,\n useOutletContext,\n useParams,\n useResolvedPath,\n useRevalidator,\n useRouteError,\n useRouteLoaderData,\n useRoutes,\n} from \"react-router\";\n\n///////////////////////////////////////////////////////////////////////////////\n// DANGER! PLEASE READ ME!\n// We provide these exports as an escape hatch in the event that you need any\n// routing data that we don't provide an explicit API for. With that said, we\n// want to cover your use case if we can, so if you feel the need to use these\n// we want to hear from you. Let us know what you're building and we'll do our\n// best to make sure we can support you!\n//\n// We consider these exports an implementation detail and do not guarantee\n// against any breaking changes, regardless of the semver release. Use with\n// extreme caution and only if you understand the consequences. Godspeed.\n///////////////////////////////////////////////////////////////////////////////\n\n/** @internal */\nexport {\n UNSAFE_DataRouterContext,\n UNSAFE_DataRouterStateContext,\n UNSAFE_NavigationContext,\n UNSAFE_LocationContext,\n UNSAFE_RouteContext,\n UNSAFE_useRouteId,\n} from \"react-router\";\n//#endregion\n\ndeclare global {\n var __staticRouterHydrationData: HydrationState | undefined;\n}\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Routers\n////////////////////////////////////////////////////////////////////////////////\n\ninterface DOMRouterOpts {\n basename?: string;\n future?: Partial<Omit<RouterFutureConfig, \"v7_prependBasename\">>;\n hydrationData?: HydrationState;\n window?: Window;\n}\n\nexport function createBrowserRouter(\n routes: RouteObject[],\n opts?: DOMRouterOpts\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n future: {\n ...opts?.future,\n v7_prependBasename: true,\n },\n history: createBrowserHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n }).initialize();\n}\n\nexport function createHashRouter(\n routes: RouteObject[],\n opts?: DOMRouterOpts\n): RemixRouter {\n return createRouter({\n basename: opts?.basename,\n future: {\n ...opts?.future,\n v7_prependBasename: true,\n },\n history: createHashHistory({ window: opts?.window }),\n hydrationData: opts?.hydrationData || parseHydrationData(),\n routes,\n mapRouteProperties,\n }).initialize();\n}\n\nfunction parseHydrationData(): HydrationState | undefined {\n let state = window?.__staticRouterHydrationData;\n if (state && state.errors) {\n state = {\n ...state,\n errors: deserializeErrors(state.errors),\n };\n }\n return state;\n}\n\nfunction deserializeErrors(\n errors: RemixRouter[\"state\"][\"errors\"]\n): RemixRouter[\"state\"][\"errors\"] {\n if (!errors) return null;\n let entries = Object.entries(errors);\n let serialized: RemixRouter[\"state\"][\"errors\"] = {};\n for (let [key, val] of entries) {\n // Hey you! If you change this, please change the corresponding logic in\n // serializeErrors in react-router-dom/server.tsx :)\n if (val && val.__type === \"RouteErrorResponse\") {\n serialized[key] = new ErrorResponse(\n val.status,\n val.statusText,\n val.data,\n val.internal === true\n );\n } else if (val && val.__type === \"Error\") {\n let error = new Error(val.message);\n // Wipe away the client-side stack trace. Nothing to fill it in with\n // because we don't serialize SSR stack traces for security reasons\n error.stack = \"\";\n serialized[key] = error;\n } else {\n serialized[key] = val;\n }\n }\n return serialized;\n}\n\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Components\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n Webpack + React 17 fails to compile on any of the following because webpack\n complains that `startTransition` doesn't exist in `React`:\n * import { startTransition } from \"react\"\n * import * as React from from \"react\";\n \"startTransition\" in React ? React.startTransition(() => setState()) : setState()\n * import * as React from from \"react\";\n \"startTransition\" in React ? React[\"startTransition\"](() => setState()) : setState()\n\n Moving it to a constant such as the following solves the Webpack/React 17 issue:\n * import * as React from from \"react\";\n const START_TRANSITION = \"startTransition\";\n START_TRANSITION in React ? React[START_TRANSITION](() => setState()) : setState()\n\n However, that introduces webpack/terser minification issues in production builds\n in React 18 where minification/obfuscation ends up removing the call of\n React.startTransition entirely from the first half of the ternary. Grabbing\n this exported reference once up front resolves that issue.\n\n See https://github.com/remix-run/react-router/issues/10579\n*/\nconst START_TRANSITION = \"startTransition\";\nconst startTransitionImpl = React[START_TRANSITION];\n\nexport interface BrowserRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Provides the cleanest URLs.\n */\nexport function BrowserRouter({\n basename,\n children,\n future,\n window,\n}: BrowserRouterProps) {\n let historyRef = React.useRef<BrowserHistory>();\n if (historyRef.current == null) {\n historyRef.current = createBrowserHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HashRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n window?: Window;\n}\n\n/**\n * A `<Router>` for use in web browsers. Stores the location in the hash\n * portion of the URL so it is not sent to the server.\n */\nexport function HashRouter({\n basename,\n children,\n future,\n window,\n}: HashRouterProps) {\n let historyRef = React.useRef<HashHistory>();\n if (historyRef.current == null) {\n historyRef.current = createHashHistory({ window, v5Compat: true });\n }\n\n let history = historyRef.current;\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nexport interface HistoryRouterProps {\n basename?: string;\n children?: React.ReactNode;\n future?: FutureConfig;\n history: History;\n}\n\n/**\n * A `<Router>` that accepts a pre-instantiated history object. It's important\n * to note that using your own history object is highly discouraged and may add\n * two versions of the history library to your bundles unless you use the same\n * version of the history library that React Router uses internally.\n */\nfunction HistoryRouter({\n basename,\n children,\n future,\n history,\n}: HistoryRouterProps) {\n let [state, setStateImpl] = React.useState({\n action: history.action,\n location: history.location,\n });\n let { v7_startTransition } = future || {};\n let setState = React.useCallback(\n (newState: { action: NavigationType; location: Location }) => {\n v7_startTransition && startTransitionImpl\n ? startTransitionImpl(() => setStateImpl(newState))\n : setStateImpl(newState);\n },\n [setStateImpl, v7_startTransition]\n );\n\n React.useLayoutEffect(() => history.listen(setState), [history, setState]);\n\n return (\n <Router\n basename={basename}\n children={children}\n location={state.location}\n navigationType={state.action}\n navigator={history}\n />\n );\n}\n\nif (__DEV__) {\n HistoryRouter.displayName = \"unstable_HistoryRouter\";\n}\n\nexport { HistoryRouter as unstable_HistoryRouter };\n\nexport interface LinkProps\n extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, \"href\"> {\n reloadDocument?: boolean;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n to: To;\n}\n\nconst isBrowser =\n typeof window !== \"undefined\" &&\n typeof window.document !== \"undefined\" &&\n typeof window.document.createElement !== \"undefined\";\n\nconst ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\\/\\/)/i;\n\n/**\n * The public API for rendering a history-aware <a>.\n */\nexport const Link = React.forwardRef<HTMLAnchorElement, LinkProps>(\n function LinkWithRef(\n {\n onClick,\n relative,\n reloadDocument,\n replace,\n state,\n target,\n to,\n preventScrollReset,\n ...rest\n },\n ref\n ) {\n let { basename } = React.useContext(NavigationContext);\n\n // Rendered into <a href> for absolute URLs\n let absoluteHref;\n let isExternal = false;\n\n if (typeof to === \"string\" && ABSOLUTE_URL_REGEX.test(to)) {\n // Render the absolute href server- and client-side\n absoluteHref = to;\n\n // Only check for external origins client-side\n if (isBrowser) {\n try {\n let currentUrl = new URL(window.location.href);\n let targetUrl = to.startsWith(\"//\")\n ? new URL(currentUrl.protocol + to)\n : new URL(to);\n let path = stripBasename(targetUrl.pathname, basename);\n\n if (targetUrl.origin === currentUrl.origin && path != null) {\n // Strip the protocol/origin/basename for same-origin absolute URLs\n to = path + targetUrl.search + targetUrl.hash;\n } else {\n isExternal = true;\n }\n } catch (e) {\n // We can't do external URL detection without a valid URL\n warning(\n false,\n `<Link to=\"${to}\"> contains an invalid URL which will probably break ` +\n `when clicked - please update to a valid URL path.`\n );\n }\n }\n }\n\n // Rendered into <a href> for relative URLs\n let href = useHref(to, { relative });\n\n let internalOnClick = useLinkClickHandler(to, {\n replace,\n state,\n target,\n preventScrollReset,\n relative,\n });\n function handleClick(\n event: React.MouseEvent<HTMLAnchorElement, MouseEvent>\n ) {\n if (onClick) onClick(event);\n if (!event.defaultPrevented) {\n internalOnClick(event);\n }\n }\n\n return (\n // eslint-disable-next-line jsx-a11y/anchor-has-content\n <a\n {...rest}\n href={absoluteHref || href}\n onClick={isExternal || reloadDocument ? onClick : handleClick}\n ref={ref}\n target={target}\n />\n );\n }\n);\n\nif (__DEV__) {\n Link.displayName = \"Link\";\n}\n\nexport interface NavLinkProps\n extends Omit<LinkProps, \"className\" | \"style\" | \"children\"> {\n children?:\n | React.ReactNode\n | ((props: { isActive: boolean; isPending: boolean }) => React.ReactNode);\n caseSensitive?: boolean;\n className?:\n | string\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => string | undefined);\n end?: boolean;\n style?:\n | React.CSSProperties\n | ((props: {\n isActive: boolean;\n isPending: boolean;\n }) => React.CSSProperties | undefined);\n}\n\n/**\n * A <Link> wrapper that knows if it's \"active\" or not.\n */\nexport const NavLink = React.forwardRef<HTMLAnchorElement, NavLinkProps>(\n function NavLinkWithRef(\n {\n \"aria-current\": ariaCurrentProp = \"page\",\n caseSensitive = false,\n className: classNameProp = \"\",\n end = false,\n style: styleProp,\n to,\n children,\n ...rest\n },\n ref\n ) {\n let path = useResolvedPath(to, { relative: rest.relative });\n let location = useLocation();\n let routerState = React.useContext(DataRouterStateContext);\n let { navigator } = React.useContext(NavigationContext);\n\n let toPathname = navigator.encodeLocation\n ? navigator.encodeLocation(path).pathname\n : path.pathname;\n let locationPathname = location.pathname;\n let nextLocationPathname =\n routerState && routerState.navigation && routerState.navigation.location\n ? routerState.navigation.location.pathname\n : null;\n\n if (!caseSensitive) {\n locationPathname = locationPathname.toLowerCase();\n nextLocationPathname = nextLocationPathname\n ? nextLocationPathname.toLowerCase()\n : null;\n toPathname = toPathname.toLowerCase();\n }\n\n let isActive =\n locationPathname === toPathname ||\n (!end &&\n locationPathname.startsWith(toPathname) &&\n locationPathname.charAt(toPathname.length) === \"/\");\n\n let isPending =\n nextLocationPathname != null &&\n (nextLocationPathname === toPathname ||\n (!end &&\n nextLocationPathname.startsWith(toPathname) &&\n nextLocationPathname.charAt(toPathname.length) === \"/\"));\n\n let ariaCurrent = isActive ? ariaCurrentProp : undefined;\n\n let className: string | undefined;\n if (typeof classNameProp === \"function\") {\n className = classNameProp({ isActive, isPending });\n } else {\n // If the className prop is not a function, we use a default `active`\n // class for <NavLink />s that are active. In v5 `active` was the default\n // value for `activeClassName`, but we are removing that API and can still\n // use the old default behavior for a cleaner upgrade path and keep the\n // simple styling rules working as they currently do.\n className = [\n classNameProp,\n isActive ? \"active\" : null,\n isPending ? \"pending\" : null,\n ]\n .filter(Boolean)\n .join(\" \");\n }\n\n let style =\n typeof styleProp === \"function\"\n ? styleProp({ isActive, isPending })\n : styleProp;\n\n return (\n <Link\n {...rest}\n aria-current={ariaCurrent}\n className={className}\n ref={ref}\n style={style}\n to={to}\n >\n {typeof children === \"function\"\n ? children({ isActive, isPending })\n : children}\n </Link>\n );\n }\n);\n\nif (__DEV__) {\n NavLink.displayName = \"NavLink\";\n}\n\nexport interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {\n /**\n * The HTTP verb to use when the form is submit. Supports \"get\", \"post\",\n * \"put\", \"delete\", \"patch\".\n */\n method?: HTMLFormMethod;\n\n /**\n * `<form encType>` - enhancing beyond the normal string type and limiting\n * to the built-in browser supported values\n */\n encType?:\n | \"application/x-www-form-urlencoded\"\n | \"multipart/form-data\"\n | \"text/plain\";\n\n /**\n * Normal `<form action>` but supports React Router's relative paths.\n */\n action?: string;\n\n /**\n * Forces a full document navigation instead of a fetch.\n */\n reloadDocument?: boolean;\n\n /**\n * Replaces the current entry in the browser history stack when the form\n * navigates. Use this if you don't want the user to be able to click \"back\"\n * to the page with the form on it.\n */\n replace?: boolean;\n\n /**\n * Determines whether the form action is relative to the route hierarchy or\n * the pathname. Use this if you want to opt out of navigating the route\n * hierarchy and want to instead route based on /-delimited URL segments\n */\n relative?: RelativeRoutingType;\n\n /**\n * Prevent the scroll position from resetting to the top of the viewport on\n * completion of the navigation when using the <ScrollRestoration> component\n */\n preventScrollReset?: boolean;\n\n /**\n * A function to call when the form is submitted. If you call\n * `event.preventDefault()` then this form will not do anything.\n */\n onSubmit?: React.FormEventHandler<HTMLFormElement>;\n}\n\n/**\n * A `@remix-run/router`-aware `<form>`. It behaves like a normal form except\n * that the interaction with the server is with `fetch` instead of new document\n * requests, allowing components to add nicer UX to the page as the form is\n * submitted and returns with data.\n */\nexport const Form = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n let submit = useSubmit();\n return <FormImpl {...props} submit={submit} ref={ref} />;\n }\n);\n\nif (__DEV__) {\n Form.displayName = \"Form\";\n}\n\ntype HTMLSubmitEvent = React.BaseSyntheticEvent<\n SubmitEvent,\n Event,\n HTMLFormElement\n>;\n\ntype HTMLFormSubmitter = HTMLButtonElement | HTMLInputElement;\n\ninterface FormImplProps extends FormProps {\n submit: SubmitFunction | FetcherSubmitFunction;\n}\n\nconst FormImpl = React.forwardRef<HTMLFormElement, FormImplProps>(\n (\n {\n reloadDocument,\n replace,\n method = defaultMethod,\n action,\n onSubmit,\n submit,\n relative,\n preventScrollReset,\n ...props\n },\n forwardedRef\n ) => {\n let formMethod: HTMLFormMethod =\n method.toLowerCase() === \"get\" ? \"get\" : \"post\";\n let formAction = useFormAction(action, { relative });\n let submitHandler: React.FormEventHandler<HTMLFormElement> = (event) => {\n onSubmit && onSubmit(event);\n if (event.defaultPrevented) return;\n event.preventDefault();\n\n let submitter = (event as unknown as HTMLSubmitEvent).nativeEvent\n .submitter as HTMLFormSubmitter | null;\n\n let submitMethod =\n (submitter?.getAttribute(\"formmethod\") as HTMLFormMethod | undefined) ||\n method;\n\n submit(submitter || event.currentTarget, {\n method: submitMethod,\n replace,\n relative,\n preventScrollReset,\n });\n };\n\n return (\n <form\n ref={forwardedRef}\n method={formMethod}\n action={formAction}\n onSubmit={reloadDocument ? onSubmit : submitHandler}\n {...props}\n />\n );\n }\n);\n\nif (__DEV__) {\n FormImpl.displayName = \"FormImpl\";\n}\n\nexport interface ScrollRestorationProps {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n}\n\n/**\n * This component will emulate the browser's scroll restoration on location\n * changes.\n */\nexport function ScrollRestoration({\n getKey,\n storageKey,\n}: ScrollRestorationProps) {\n useScrollRestoration({ getKey, storageKey });\n return null;\n}\n\nif (__DEV__) {\n ScrollRestoration.displayName = \"ScrollRestoration\";\n}\n//#endregion\n\n////////////////////////////////////////////////////////////////////////////////\n//#region Hooks\n////////////////////////////////////////////////////////////////////////////////\n\nenum DataRouterHook {\n UseScrollRestoration = \"useScrollRestoration\",\n UseSubmit = \"useSubmit\",\n UseSubmitFetcher = \"useSubmitFetcher\",\n UseFetcher = \"useFetcher\",\n}\n\nenum DataRouterStateHook {\n UseFetchers = \"useFetchers\",\n UseScrollRestoration = \"useScrollRestoration\",\n}\n\nfunction getDataRouterConsoleError(\n hookName: DataRouterHook | DataRouterStateHook\n) {\n return `${hookName} must be used within a data router. See https://reactrouter.com/routers/picking-a-router.`;\n}\n\nfunction useDataRouterContext(hookName: DataRouterHook) {\n let ctx = React.useContext(DataRouterContext);\n invariant(ctx, getDataRouterConsoleError(hookName));\n return ctx;\n}\n\nfunction useDataRouterState(hookName: DataRouterStateHook) {\n let state = React.useContext(DataRouterStateContext);\n invariant(state, getDataRouterConsoleError(hookName));\n return state;\n}\n\n/**\n * Handles the click behavior for router `<Link>` components. This is useful if\n * you need to create custom `<Link>` components with the same click behavior we\n * use in our exported `<Link>`.\n */\nexport function useLinkClickHandler<E extends Element = HTMLAnchorElement>(\n to: To,\n {\n target,\n replace: replaceProp,\n state,\n preventScrollReset,\n relative,\n }: {\n target?: React.HTMLAttributeAnchorTarget;\n replace?: boolean;\n state?: any;\n preventScrollReset?: boolean;\n relative?: RelativeRoutingType;\n } = {}\n): (event: React.MouseEvent<E, MouseEvent>) => void {\n let navigate = useNavigate();\n let location = useLocation();\n let path = useResolvedPath(to, { relative });\n\n return React.useCallback(\n (event: React.MouseEvent<E, MouseEvent>) => {\n if (shouldProcessLinkClick(event, target)) {\n event.preventDefault();\n\n // If the URL hasn't changed, a regular <a> will do a replace instead of\n // a push, so do the same here unless the replace prop is explicitly set\n let replace =\n replaceProp !== undefined\n ? replaceProp\n : createPath(location) === createPath(path);\n\n navigate(to, { replace, state, preventScrollReset, relative });\n }\n },\n [\n location,\n navigate,\n path,\n replaceProp,\n state,\n target,\n to,\n preventScrollReset,\n relative,\n ]\n );\n}\n\n/**\n * A convenient wrapper for reading and writing search parameters via the\n * URLSearchParams interface.\n */\nexport function useSearchParams(\n defaultInit?: URLSearchParamsInit\n): [URLSearchParams, SetURLSearchParams] {\n warning(\n typeof URLSearchParams !== \"undefined\",\n `You cannot use the \\`useSearchParams\\` hook in a browser that does not ` +\n `support the URLSearchParams API. If you need to support Internet ` +\n `Explorer 11, we recommend you load a polyfill such as ` +\n `https://github.com/ungap/url-search-params\\n\\n` +\n `If you're unsure how to load polyfills, we recommend you check out ` +\n `https://polyfill.io/v3/ which provides some recommendations about how ` +\n `to load polyfills only for users that need them, instead of for every ` +\n `user.`\n );\n\n let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));\n let hasSetSearchParamsRef = React.useRef(false);\n\n let location = useLocation();\n let searchParams = React.useMemo(\n () =>\n // Only merge in the defaults if we haven't yet called setSearchParams.\n // Once we call that we want those to take precedence, otherwise you can't\n // remove a param with setSearchParams({}) if it has an initial value\n getSearchParamsForLocation(\n location.search,\n hasSetSearchParamsRef.current ? null : defaultSearchParamsRef.current\n ),\n [location.search]\n );\n\n let navigate = useNavigate();\n let setSearchParams = React.useCallback<SetURLSearchParams>(\n (nextInit, navigateOptions) => {\n const newSearchParams = createSearchParams(\n typeof nextInit === \"function\" ? nextInit(searchParams) : nextInit\n );\n hasSetSearchParamsRef.current = true;\n navigate(\"?\" + newSearchParams, navigateOptions);\n },\n [navigate, searchParams]\n );\n\n return [searchParams, setSearchParams];\n}\n\nexport type SetURLSearchParams = (\n nextInit?:\n | URLSearchParamsInit\n | ((prev: URLSearchParams) => URLSearchParamsInit),\n navigateOpts?: NavigateOptions\n) => void;\n\n/**\n * Submits a HTML `<form>` to the server without reloading the page.\n */\nexport interface SubmitFunction {\n (\n /**\n * Specifies the `<form>` to be submitted to the server, a specific\n * `<button>` or `<input type=\"submit\">` to use to submit the form, or some\n * arbitrary data to submit.\n *\n * Note: When using a `<button>` its `name` and `value` will also be\n * included in the form data that is submitted.\n */\n target: SubmitTarget,\n\n /**\n * Options that override the `<form>`'s own attributes. Required when\n * submitting arbitrary data without a backing `<form>`.\n */\n options?: SubmitOptions\n ): void;\n}\n\n/**\n * Submits a fetcher `<form>` to the server without reloading the page.\n */\nexport interface FetcherSubmitFunction {\n (\n target: SubmitTarget,\n // Fetchers cannot replace because they are not navigation events\n options?: Omit<SubmitOptions, \"replace\">\n ): void;\n}\n\nfunction validateClientSideSubmission() {\n if (typeof document === \"undefined\") {\n throw new Error(\n \"You are calling submit during the server render. \" +\n \"Try calling submit within a `useEffect` or callback instead.\"\n );\n }\n}\n\n/**\n * Returns a function that may be used to programmatically submit a form (or\n * some arbitrary data) to the server.\n */\nexport function useSubmit(): SubmitFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseSubmit);\n let { basename } = React.useContext(NavigationContext);\n let currentRouteId = useRouteId();\n\n return React.useCallback<SubmitFunction>(\n (target, options = {}) => {\n validateClientSideSubmission();\n\n let { action, method, encType, formData, body } = getFormSubmissionInfo(\n target,\n basename\n );\n\n router.navigate(options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || (method as HTMLFormMethod),\n formEncType: options.encType || (encType as FormEncType),\n replace: options.replace,\n fromRouteId: currentRouteId,\n });\n },\n [router, basename, currentRouteId]\n );\n}\n\n/**\n * Returns the implementation for fetcher.submit\n */\nfunction useSubmitFetcher(\n fetcherKey: string,\n fetcherRouteId: string\n): FetcherSubmitFunction {\n let { router } = useDataRouterContext(DataRouterHook.UseSubmitFetcher);\n let { basename } = React.useContext(NavigationContext);\n\n return React.useCallback<FetcherSubmitFunction>(\n (target, options = {}) => {\n validateClientSideSubmission();\n\n let { action, method, encType, formData, body } = getFormSubmissionInfo(\n target,\n basename\n );\n\n invariant(\n fetcherRouteId != null,\n \"No routeId available for useFetcher()\"\n );\n router.fetch(fetcherKey, fetcherRouteId, options.action || action, {\n preventScrollReset: options.preventScrollReset,\n formData,\n body,\n formMethod: options.method || (method as HTMLFormMethod),\n formEncType: options.encType || (encType as FormEncType),\n });\n },\n [router, basename, fetcherKey, fetcherRouteId]\n );\n}\n\n// v7: Eventually we should deprecate this entirely in favor of using the\n// router method directly?\nexport function useFormAction(\n action?: string,\n { relative }: { relative?: RelativeRoutingType } = {}\n): string {\n let { basename } = React.useContext(NavigationContext);\n let routeContext = React.useContext(RouteContext);\n invariant(routeContext, \"useFormAction must be used inside a RouteContext\");\n\n let [match] = routeContext.matches.slice(-1);\n // Shallow clone path so we can modify it below, otherwise we modify the\n // object referenced by useMemo inside useResolvedPath\n let path = { ...useResolvedPath(action ? action : \".\", { relative }) };\n\n // Previously we set the default action to \".\". The problem with this is that\n // `useResolvedPath(\".\")` excludes search params and the hash of the resolved\n // URL. This is the intended behavior of when \".\" is specifically provided as\n // the form action, but inconsistent w/ browsers when the action is omitted.\n // https://github.com/remix-run/remix/issues/927\n let location = useLocation();\n if (action == null) {\n // Safe to write to these directly here since if action was undefined, we\n // would have called useResolvedPath(\".\") which will never include a search\n // or hash\n path.search = location.search;\n path.hash = location.hash;\n\n // When grabbing search params from the URL, remove the automatically\n // inserted ?index param so we match the useResolvedPath search behavior\n // which would not include ?index\n if (match.route.index) {\n let params = new URLSearchParams(path.search);\n params.delete(\"index\");\n path.search = params.toString() ? `?${params.toString()}` : \"\";\n }\n }\n\n if ((!action || action === \".\") && match.route.index) {\n path.search = path.search\n ? path.search.replace(/^\\?/, \"?index&\")\n : \"?index\";\n }\n\n // If we're operating within a basename, prepend it to the pathname prior\n // to creating the form action. If this is a root navigation, then just use\n // the raw basename which allows the basename to have full control over the\n // presence of a trailing slash on root actions\n if (basename !== \"/\") {\n path.pathname =\n path.pathname === \"/\" ? basename : joinPaths([basename, path.pathname]);\n }\n\n return createPath(path);\n}\n\nfunction createFetcherForm(fetcherKey: string, routeId: string) {\n let FetcherForm = React.forwardRef<HTMLFormElement, FormProps>(\n (props, ref) => {\n let submit = useSubmitFetcher(fetcherKey, routeId);\n return <FormImpl {...props} ref={ref} submit={submit} />;\n }\n );\n if (__DEV__) {\n FetcherForm.displayName = \"fetcher.Form\";\n }\n return FetcherForm;\n}\n\nlet fetcherId = 0;\n\nexport type FetcherWithComponents<TData> = Fetcher<TData> & {\n Form: ReturnType<typeof createFetcherForm>;\n submit: FetcherSubmitFunction;\n load: (href: string) => void;\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 */\nexport function useFetcher<TData = any>(): FetcherWithComponents<TData> {\n let { router } = useDataRouterContext(DataRouterHook.UseFetcher);\n\n let route = React.useContext(RouteContext);\n invariant(route, `useFetcher must be used inside a RouteContext`);\n\n let routeId = route.matches[route.matches.length - 1]?.route.id;\n invariant(\n routeId != null,\n `useFetcher can only be used on routes that contain a unique \"id\"`\n );\n\n let [fetcherKey] = React.useState(() => String(++fetcherId));\n let [Form] = React.useState(() => {\n invariant(routeId, `No routeId available for fetcher.Form()`);\n return createFetcherForm(fetcherKey, routeId);\n });\n let [load] = React.useState(() => (href: string) => {\n invariant(router, \"No router available for fetcher.load()\");\n invariant(routeId, \"No routeId available for fetcher.load()\");\n router.fetch(fetcherKey, routeId, href);\n });\n let submit = useSubmitFetcher(fetcherKey, routeId);\n\n let fetcher = router.getFetcher<TData>(fetcherKey);\n\n let fetcherWithComponents = React.useMemo(\n () => ({\n Form,\n submit,\n load,\n ...fetcher,\n }),\n [fetcher, Form, submit, load]\n );\n\n React.useEffect(() => {\n // Is this busted when the React team gets real weird and calls effects\n // twice on mount? We really just need to garbage collect here when this\n // fetcher is no longer around.\n return () => {\n if (!router) {\n console.warn(`No router available to clean up from useFetcher()`);\n return;\n }\n router.deleteFetcher(fetcherKey);\n };\n }, [router, fetcherKey]);\n\n return fetcherWithComponents;\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 */\nexport function useFetchers(): Fetcher[] {\n let state = useDataRouterState(DataRouterStateHook.UseFetchers);\n return [...state.fetchers.values()];\n}\n\nconst SCROLL_RESTORATION_STORAGE_KEY = \"react-router-scroll-positions\";\nlet savedScrollPositions: Record<string, number> = {};\n\n/**\n * When rendered inside a RouterProvider, will restore scroll positions on navigations\n */\nfunction useScrollRestoration({\n getKey,\n storageKey,\n}: {\n getKey?: GetScrollRestorationKeyFunction;\n storageKey?: string;\n} = {}) {\n let { router } = useDataRouterContext(DataRouterHook.UseScrollRestoration);\n let { restoreScrollPosition, preventScrollReset } = useDataRouterState(\n DataRouterStateHook.UseScrollRestoration\n );\n let { basename } = React.useContext(NavigationContext);\n let location = useLocation();\n let matches = useMatches();\n let navigation = useNavigation();\n\n // Trigger manual scroll restoration while we're active\n React.useEffect(() => {\n window.history.scrollRestoration = \"manual\";\n return () => {\n window.history.scrollRestoration = \"auto\";\n };\n }, []);\n\n // Save positions on pagehide\n usePageHide(\n React.useCallback(() => {\n if (navigation.state === \"idle\") {\n let key = (getKey ? getKey(location, matches) : null) || location.key;\n savedScrollPositions[key] = window.scrollY;\n }\n sessionStorage.setItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY,\n JSON.stringify(savedScrollPositions)\n );\n window.history.scrollRestoration = \"auto\";\n }, [storageKey, getKey, navigation.state, location, matches])\n );\n\n // Read in any saved scroll locations\n if (typeof document !== \"undefined\") {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n try {\n let sessionPositions = sessionStorage.getItem(\n storageKey || SCROLL_RESTORATION_STORAGE_KEY\n );\n if (sessionPositions) {\n savedScrollPositions = JSON.parse(sessionPositions);\n }\n } catch (e) {\n // no-op, use default empty object\n }\n }, [storageKey]);\n\n // Enable scroll restoration in the router\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n let getKeyWithoutBasename: GetScrollRestorationKeyFunction | undefined =\n getKey && basename !== \"/\"\n ? (location, matches) =>\n getKey(\n // Strip the basename to match useLocation()\n {\n ...location,\n pathname:\n stripBasename(location.pathname, basename) ||\n location.pathname,\n },\n matches\n )\n : getKey;\n let disableScrollRestoration = router?.enableScrollRestoration(\n savedScrollPositions,\n () => window.scrollY,\n getKeyWithoutBasename\n );\n return () => disableScrollRestoration && disableScrollRestoration();\n }, [router, basename, getKey]);\n\n // Restore scrolling when state.restoreScrollPosition changes\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useLayoutEffect(() => {\n // Explicit false means don't do anything (used for submissions)\n if (restoreScrollPosition === false) {\n return;\n }\n\n // been here before, scroll to it\n if (typeof restoreScrollPosition === \"number\") {\n window.scrollTo(0, restoreScrollPosition);\n return;\n }\n\n // try to scroll to the hash\n if (location.hash) {\n let el = document.getElementById(location.hash.slice(1));\n if (el) {\n el.scrollIntoView();\n return;\n }\n }\n\n // Don't reset if this navigation opted out\n if (preventScrollReset === true) {\n return;\n }\n\n // otherwise go to the top on new locations\n window.scrollTo(0, 0);\n }, [location, restoreScrollPosition, preventScrollReset]);\n }\n}\n\nexport { useScrollRestoration as UNSAFE_useScrollRestoration };\n\n/**\n * Setup a callback to be fired on the window's `beforeunload` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nexport function useBeforeUnload(\n callback: (event: BeforeUnloadEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"beforeunload\", callback, opts);\n return () => {\n window.removeEventListener(\"beforeunload\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Setup a callback to be fired on the window's `pagehide` event. This is\n * useful for saving some data to `window.localStorage` just before the page\n * refreshes. This event is better supported than beforeunload across browsers.\n *\n * Note: The `callback` argument should be a function created with\n * `React.useCallback()`.\n */\nfunction usePageHide(\n callback: (event: PageTransitionEvent) => any,\n options?: { capture?: boolean }\n): void {\n let { capture } = options || {};\n React.useEffect(() => {\n let opts = capture != null ? { capture } : undefined;\n window.addEventListener(\"pagehide\", callback, opts);\n return () => {\n window.removeEventListener(\"pagehide\", callback, opts);\n };\n }, [callback, capture]);\n}\n\n/**\n * Wrapper around useBlocker to show a window.confirm prompt to users instead\n * of building a custom UI with useBlocker.\n *\n * Warning: This has *a lot of rough edges* and behaves very differently (and\n * very incorrectly in some cases) across browsers if user click addition\n * back/forward navigations while the confirm is open. Use at your own risk.\n */\nfunction usePrompt({ when, message }: { when: boolean; message: string }) {\n let blocker = useBlocker(when);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\" && !when) {\n blocker.reset();\n }\n }, [blocker, when]);\n\n React.useEffect(() => {\n if (blocker.state === \"blocked\") {\n let proceed = window.confirm(message);\n if (proceed) {\n setTimeout(blocker.proceed, 0);\n } else {\n blocker.reset();\n }\n }\n }, [blocker, message]);\n}\n\nexport { usePrompt as unstable_usePrompt };\n\n//#endregion\n","var isArray = require('../internals/is-array');\nvar isConstructor = require('../internals/is-constructor');\nvar isObject = require('../internals/is-object');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\nvar $Array = Array;\n\n// a part of `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? $Array : C;\n};\n","var arraySpeciesConstructor = require('../internals/array-species-constructor');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);\n};\n","'use strict';\nvar isArray = require('../internals/is-array');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer');\nvar bind = require('../internals/function-bind-context');\n\n// `FlattenIntoArray` abstract operation\n// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray\nvar flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {\n var targetIndex = start;\n var sourceIndex = 0;\n var mapFn = mapper ? bind(mapper, thisArg) : false;\n var element, elementLen;\n\n while (sourceIndex < sourceLen) {\n if (sourceIndex in source) {\n element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];\n\n if (depth > 0 && isArray(element)) {\n elementLen = lengthOfArrayLike(element);\n targetIndex = flattenIntoArray(target, original, element, elementLen, targetIndex, depth - 1) - 1;\n } else {\n doesNotExceedSafeInteger(targetIndex + 1);\n target[targetIndex] = element;\n }\n\n targetIndex++;\n }\n sourceIndex++;\n }\n return targetIndex;\n};\n\nmodule.exports = flattenIntoArray;\n","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toIntegerOrInfinity = require('../internals/to-integer-or-infinity');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flat` method\n// https://tc39.es/ecma262/#sec-array.prototype.flat\n$({ target: 'Array', proto: true }, {\n flat: function flat(/* depthArg = 1 */) {\n var depthArg = arguments.length ? arguments[0] : undefined;\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));\n return A;\n }\n});\n","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flat');\n","export default function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}"],"sourceRoot":""}