@ampath/esm-laboratory-app 1.3.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.editorconfig +12 -0
- package/.eslintignore +2 -0
- package/.eslintrc +68 -0
- package/.husky/pre-commit +7 -0
- package/.husky/pre-push +6 -0
- package/.prettierignore +12 -0
- package/.prettierrc +8 -0
- package/.tx/config +11 -0
- package/.yarn/plugins/@yarnpkg/plugin-outdated.cjs +35 -0
- package/README.md +54 -0
- package/__mocks__/react-i18next.js +50 -0
- package/assets/screenshots/labs_enter_results.png +0 -0
- package/assets/screenshots/labs_general_dashboard.png +0 -0
- package/dist/1119.js +1 -0
- package/dist/1197.js +1 -0
- package/dist/1222.js +1 -0
- package/dist/1222.js.map +1 -0
- package/dist/1243.js +1 -0
- package/dist/1243.js.map +1 -0
- package/dist/2146.js +1 -0
- package/dist/2690.js +1 -0
- package/dist/3099.js +1 -0
- package/dist/3106.js +1 -0
- package/dist/3106.js.map +1 -0
- package/dist/312.js +1 -0
- package/dist/312.js.map +1 -0
- package/dist/3352.js +1 -0
- package/dist/3352.js.map +1 -0
- package/dist/3535.js +1 -0
- package/dist/3535.js.map +1 -0
- package/dist/3584.js +1 -0
- package/dist/4044.js +1 -0
- package/dist/4044.js.map +1 -0
- package/dist/4055.js +1 -0
- package/dist/4132.js +1 -0
- package/dist/4300.js +1 -0
- package/dist/4335.js +1 -0
- package/dist/439.js +1 -0
- package/dist/4535.js +1 -0
- package/dist/4535.js.map +1 -0
- package/dist/4618.js +1 -0
- package/dist/4652.js +1 -0
- package/dist/4748.js +2 -0
- package/dist/4748.js.LICENSE.txt +9 -0
- package/dist/4748.js.map +1 -0
- package/dist/4920.js +1 -0
- package/dist/4920.js.map +1 -0
- package/dist/4944.js +1 -0
- package/dist/5048.js +2 -0
- package/dist/5048.js.LICENSE.txt +29 -0
- package/dist/5048.js.map +1 -0
- package/dist/5088.js +1 -0
- package/dist/5088.js.map +1 -0
- package/dist/5173.js +1 -0
- package/dist/5241.js +1 -0
- package/dist/53.js +1 -0
- package/dist/53.js.map +1 -0
- package/dist/5339.js +1 -0
- package/dist/5339.js.map +1 -0
- package/dist/5348.js +1 -0
- package/dist/5348.js.map +1 -0
- package/dist/5380.js +1 -0
- package/dist/5380.js.map +1 -0
- package/dist/5442.js +1 -0
- package/dist/5661.js +1 -0
- package/dist/5780.js +2 -0
- package/dist/5780.js.LICENSE.txt +9 -0
- package/dist/5780.js.map +1 -0
- package/dist/6022.js +1 -0
- package/dist/6468.js +1 -0
- package/dist/6589.js +1 -0
- package/dist/6679.js +1 -0
- package/dist/6753.js +1 -0
- package/dist/6753.js.map +1 -0
- package/dist/6777.js +2 -0
- package/dist/6777.js.LICENSE.txt +19 -0
- package/dist/6777.js.map +1 -0
- package/dist/679.js +2 -0
- package/dist/679.js.LICENSE.txt +9 -0
- package/dist/679.js.map +1 -0
- package/dist/6840.js +1 -0
- package/dist/6859.js +1 -0
- package/dist/7097.js +1 -0
- package/dist/7129.js +1 -0
- package/dist/7129.js.map +1 -0
- package/dist/7159.js +1 -0
- package/dist/723.js +1 -0
- package/dist/7617.js +1 -0
- package/dist/791.js +1 -0
- package/dist/791.js.map +1 -0
- package/dist/795.js +1 -0
- package/dist/8163.js +1 -0
- package/dist/8349.js +1 -0
- package/dist/8371.js +1 -0
- package/dist/841.js +1 -0
- package/dist/841.js.map +1 -0
- package/dist/8618.js +1 -0
- package/dist/8627.js +2 -0
- package/dist/8627.js.LICENSE.txt +25 -0
- package/dist/8627.js.map +1 -0
- package/dist/8898.js +2 -0
- package/dist/8898.js.LICENSE.txt +32 -0
- package/dist/8898.js.map +1 -0
- package/dist/890.js +1 -0
- package/dist/9214.js +1 -0
- package/dist/9321.js +1 -0
- package/dist/9321.js.map +1 -0
- package/dist/9452.js +1 -0
- package/dist/9452.js.map +1 -0
- package/dist/9538.js +1 -0
- package/dist/9569.js +1 -0
- package/dist/9695.js +1 -0
- package/dist/9695.js.map +1 -0
- package/dist/986.js +1 -0
- package/dist/9879.js +1 -0
- package/dist/9895.js +1 -0
- package/dist/9900.js +1 -0
- package/dist/9910.js +1 -0
- package/dist/9910.js.map +1 -0
- package/dist/9913.js +1 -0
- package/dist/main.js +2 -0
- package/dist/main.js.LICENSE.txt +45 -0
- package/dist/main.js.map +1 -0
- package/dist/openmrs-esm-laboratory-app.js +1 -0
- package/dist/openmrs-esm-laboratory-app.js.buildmanifest.json +1744 -0
- package/dist/openmrs-esm-laboratory-app.js.map +1 -0
- package/dist/routes.json +1 -0
- package/e2e/README.md +117 -0
- package/e2e/commands/encounter-operations.ts +63 -0
- package/e2e/commands/index.ts +5 -0
- package/e2e/commands/patient-operations.ts +109 -0
- package/e2e/commands/provider-operations.ts +9 -0
- package/e2e/commands/test-order-operations.ts +46 -0
- package/e2e/commands/types/index.ts +157 -0
- package/e2e/commands/visit-operations.ts +38 -0
- package/e2e/core/global-setup.ts +32 -0
- package/e2e/core/index.ts +1 -0
- package/e2e/core/test.ts +31 -0
- package/e2e/fixtures/api.ts +27 -0
- package/e2e/fixtures/fhirApi.ts +28 -0
- package/e2e/fixtures/index.ts +2 -0
- package/e2e/pages/index.ts +1 -0
- package/e2e/pages/laboratory-page.ts +28 -0
- package/e2e/specs/add-lab-results.spec.ts +111 -0
- package/e2e/specs/reject-lab-request.spec.ts +88 -0
- package/e2e/specs/test-orders.spec.ts +69 -0
- package/e2e/support/github/Dockerfile +34 -0
- package/e2e/support/github/docker-compose.yml +24 -0
- package/e2e/support/github/run-e2e-docker-env.sh +58 -0
- package/example.env +7 -0
- package/jest.config.js +35 -0
- package/package.json +105 -0
- package/playwright.config.ts +42 -0
- package/src/components/create-dashboard-link.component.tsx +37 -0
- package/src/components/loader/loader.component.tsx +11 -0
- package/src/components/loader/loader.scss +9 -0
- package/src/components/orders-table/list-order-details.component.tsx +143 -0
- package/src/components/orders-table/list-order-details.scss +136 -0
- package/src/components/orders-table/order-detail.scss +18 -0
- package/src/components/orders-table/orders-data-table.component.tsx +349 -0
- package/src/components/orders-table/orders-data-table.scss +129 -0
- package/src/components/orders-table/orders-data-table.test.tsx +214 -0
- package/src/components/orders-table/orders-date-range-picker.component.tsx +32 -0
- package/src/components/orders-table/orders-date-range-picker.scss +7 -0
- package/src/components/summary-tile/lab-summary-tile.component.tsx +31 -0
- package/src/components/summary-tile/lab-summary-tile.scss +64 -0
- package/src/config-schema.ts +39 -0
- package/src/constants.ts +2 -0
- package/src/declarations.d.ts +2 -0
- package/src/index.ts +123 -0
- package/src/lab-tabs/actions/actions.scss +26 -0
- package/src/lab-tabs/actions/add-lab-request-results-action.component.tsx +46 -0
- package/src/lab-tabs/actions/amend-lab-results-action.component.tsx +40 -0
- package/src/lab-tabs/actions/approve-lab-results-action.component.tsx +36 -0
- package/src/lab-tabs/actions/pickup-lab-request-action.component.tsx +36 -0
- package/src/lab-tabs/actions/reject-lab-request-action.component.tsx +36 -0
- package/src/lab-tabs/data-table-extensions/completed-lab-requests-table.extension.tsx +8 -0
- package/src/lab-tabs/data-table-extensions/declined-lab-requests-table-extension.tsx +8 -0
- package/src/lab-tabs/data-table-extensions/in-progress-lab-requests-table.extension.tsx +8 -0
- package/src/lab-tabs/data-table-extensions/pending-review-lab-request-table.extension.tsx +8 -0
- package/src/lab-tabs/data-table-extensions/tests-ordered-table.extension.tsx +8 -0
- package/src/lab-tabs/laboratory-tabs.component.tsx +81 -0
- package/src/lab-tabs/laboratory-tabs.scss +38 -0
- package/src/lab-tabs/modals/approval-lab-results-modal.component.tsx +70 -0
- package/src/lab-tabs/modals/pickup-lab-request-modal.component.tsx +67 -0
- package/src/lab-tabs/modals/pickup-lab-request-modal.test.tsx +127 -0
- package/src/lab-tabs/modals/reject-lab-request-modal.component.tsx +86 -0
- package/src/lab-tabs/modals/reject-lab-request-modal.scss +13 -0
- package/src/lab-tabs/modals/reject-lab-request-modal.test.tsx +152 -0
- package/src/lab-tiles/all-lab-requests-tile.component.tsx +19 -0
- package/src/lab-tiles/completed-lab-requests-tile.component.tsx +19 -0
- package/src/lab-tiles/in-progress-lab-requests-tile.component.tsx +19 -0
- package/src/lab-tiles/laboratory-summary-tiles.component.tsx +52 -0
- package/src/lab-tiles/laboratory-summary-tiles.scss +16 -0
- package/src/lab-tiles/pending-review-lab-results-tile.component.tsx +22 -0
- package/src/laboratory-dashboard.component.tsx +30 -0
- package/src/laboratory-dashboard.scss +5 -0
- package/src/laboratory.resource.ts +108 -0
- package/src/root.component.tsx +15 -0
- package/src/routes.json +204 -0
- package/src/types.ts +39 -0
- package/tools/i18next-parser.config.js +93 -0
- package/tools/index.ts +1 -0
- package/tools/setup-tests.ts +8 -0
- package/tools/test-utils.ts +44 -0
- package/tools/update-openmrs-deps.mjs +42 -0
- package/translations/am.json +79 -0
- package/translations/ar.json +79 -0
- package/translations/ar_SY.json +79 -0
- package/translations/bn.json +79 -0
- package/translations/cs.json +79 -0
- package/translations/de.json +79 -0
- package/translations/en.json +79 -0
- package/translations/en_US.json +79 -0
- package/translations/es.json +79 -0
- package/translations/es_MX.json +79 -0
- package/translations/fr.json +79 -0
- package/translations/he.json +79 -0
- package/translations/hi.json +79 -0
- package/translations/hi_IN.json +79 -0
- package/translations/id.json +79 -0
- package/translations/it.json +79 -0
- package/translations/ka.json +79 -0
- package/translations/km.json +79 -0
- package/translations/ku.json +79 -0
- package/translations/ky.json +79 -0
- package/translations/lg.json +79 -0
- package/translations/ne.json +79 -0
- package/translations/pl.json +79 -0
- package/translations/pt.json +79 -0
- package/translations/pt_BR.json +79 -0
- package/translations/qu.json +79 -0
- package/translations/ro_RO.json +79 -0
- package/translations/ru_RU.json +79 -0
- package/translations/si.json +79 -0
- package/translations/sq.json +79 -0
- package/translations/sw.json +79 -0
- package/translations/sw_KE.json +79 -0
- package/translations/tr.json +79 -0
- package/translations/tr_TR.json +79 -0
- package/translations/uk.json +79 -0
- package/translations/uz.json +79 -0
- package/translations/uz@Latn.json +79 -0
- package/translations/uz_UZ.json +79 -0
- package/translations/vi.json +79 -0
- package/translations/zh.json +79 -0
- package/translations/zh_CN.json +79 -0
- package/translations/zh_TW.json +79 -0
- package/tsconfig.json +28 -0
- package/turbo.json +15 -0
- package/webpack.config.js +25 -0
package/dist/8898.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 8898.js.LICENSE.txt */
|
|
2
|
+
"use strict";(globalThis.webpackChunk_ampath_esm_laboratory_app=globalThis.webpackChunk_ampath_esm_laboratory_app||[]).push([[8898],{8898:(e,t,r)=>{r.r(t),r.d(t,{AbortedDeferredError:()=>ye,Await:()=>Ur,BrowserRouter:()=>Sn,Form:()=>_n,HashRouter:()=>En,Link:()=>Dn,MemoryRouter:()=>_r,NavLink:()=>Ln,Navigate:()=>Ar,NavigationType:()=>n,Outlet:()=>Tr,Route:()=>jr,Router:()=>Or,RouterProvider:()=>bn,Routes:()=>Mr,ScrollRestoration:()=>An,UNSAFE_DataRouterContext:()=>Ft,UNSAFE_DataRouterStateContext:()=>It,UNSAFE_ErrorResponseImpl:()=>Re,UNSAFE_FetchersContext:()=>dn,UNSAFE_LocationContext:()=>zt,UNSAFE_NavigationContext:()=>Bt,UNSAFE_RouteContext:()=>Ht,UNSAFE_ViewTransitionContext:()=>fn,UNSAFE_useRouteId:()=>vr,UNSAFE_useScrollRestoration:()=>Kn,createBrowserRouter:()=>un,createHashRouter:()=>sn,createMemoryRouter:()=>Kr,createPath:()=>I,createRoutesFromChildren:()=>zr,createRoutesFromElements:()=>zr,createSearchParams:()=>Zr,defer:()=>ge,generatePath:()=>ne,isRouteErrorResponse:()=>xe,json:()=>me,matchPath:()=>ae,matchRoutes:()=>W,parsePath:()=>N,redirect:()=>we,redirectDocument:()=>Se,renderMatches:()=>Hr,replace:()=>Ee,resolvePath:()=>ue,unstable_HistoryRouter:()=>Rn,unstable_usePrompt:()=>Vn,useActionData:()=>wr,useAsyncError:()=>Rr,useAsyncValue:()=>Er,useBeforeUnload:()=>$n,useBlocker:()=>kr,useFetcher:()=>Bn,useFetchers:()=>zn,useFormAction:()=>Nn,useHref:()=>Kt,useInRouterContext:()=>$t,useLinkClickHandler:()=>On,useLoaderData:()=>br,useLocation:()=>Vt,useMatch:()=>qt,useMatches:()=>yr,useNavigate:()=>Xt,useNavigation:()=>pr,useNavigationType:()=>Jt,useOutlet:()=>Zt,useOutletContext:()=>Qt,useParams:()=>er,useResolvedPath:()=>tr,useRevalidator:()=>mr,useRouteError:()=>Sr,useRouteLoaderData:()=>gr,useRoutes:()=>rr,useSearchParams:()=>Mn,useSubmit:()=>In,useViewTransitionState:()=>Jn});var n,a=r(6072),o=r(6777),i=r.t(o,2);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function s(e){if(Array.isArray(e))return e}function c(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function l(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var o=e.apply(t,r);function i(e){c(o,n,a,i,u,"next",e)}function u(e){c(o,n,a,i,u,"throw",e)}i(void 0)})}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t,r){return d=k()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var a=new(Function.bind.apply(e,n));return r&&g(a,r.prototype),a},d.apply(null,arguments)}function h(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function v(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function y(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function b(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function w(e,t){return s(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||R(e,t)||b()}function S(e){return function(e){if(Array.isArray(e))return u(e)}(e)||y(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function E(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}function R(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function x(e){var t="function"==typeof Map?new Map:void 0;return x=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,p(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),g(n,e)},x(e)}function k(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(k=function(){return!!e})()}function C(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}function P(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},D.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(n||(n={}));var L,_="popstate";function A(e){void 0===e&&(e={});var t,r=e.initialEntries,a=void 0===r?["/"]:r,o=e.initialIndex,i=e.v5Compat,u=void 0!==i&&i;t=a.map(function(e,t){return h(e,"string"==typeof e?null:e.state,0===t?"default":void 0)});var s=f(null==o?t.length-1:o),c=n.Pop,l=null;function f(e){return Math.min(Math.max(e,0),t.length-1)}function d(){return t[s]}function h(e,r,n){void 0===r&&(r=null);var a=F(t?d().pathname:"/",e,r,n);return M("/"===a.pathname.charAt(0),"relative pathnames are not supported in memory history: "+JSON.stringify(e)),a}function v(e){return"string"==typeof e?e:I(e)}return{get index(){return s},get action(){return c},get location(){return d()},createHref:v,createURL:function(e){return new URL(v(e),"http://localhost")},encodeLocation:function(e){var t="string"==typeof e?N(e):e;return{pathname:t.pathname||"",search:t.search||"",hash:t.hash||""}},push:function(e,r){c=n.Push;var a=h(e,r);s+=1,t.splice(s,t.length,a),u&&l&&l({action:c,location:a,delta:1})},replace:function(e,r){c=n.Replace;var a=h(e,r);t[s]=a,u&&l&&l({action:c,location:a,delta:0})},go:function(e){c=n.Pop;var r=f(s+e),a=t[r];s=r,l&&l({action:c,location:a,delta:e})},listen:function(e){return l=e,function(){l=null}}}}function T(e){return void 0===e&&(e={}),B(function(e,t){var r=e.location;return F("",{pathname:r.pathname,search:r.search,hash:r.hash},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:I(t)},null,e)}function j(e){return void 0===e&&(e={}),B(function(e,t){var r=N(e.location.hash.substr(1)),n=r.pathname,a=void 0===n?"/":n,o=r.search,i=void 0===o?"":o,u=r.hash,s=void 0===u?"":u;return a.startsWith("/")||a.startsWith(".")||(a="/"+a),F("",{pathname:a,search:i,hash:s},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){var r=e.document.querySelector("base"),n="";if(r&&r.getAttribute("href")){var a=e.location.href,o=a.indexOf("#");n=-1===o?a:a.slice(0,o)}return n+"#"+("string"==typeof t?t:I(t))},function(e,t){M("/"===e.pathname.charAt(0),"relative pathnames are not supported in hash history.push("+JSON.stringify(t)+")")},e)}function O(e,t){if(!1===e||null==e)throw new Error(t)}function M(e,t){if(!e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}}function U(e,t){return{usr:e.state,key:e.key,idx:t}}function F(e,t,r,n){return void 0===r&&(r=null),D({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?N(t):t,{state:r,key:t&&t.key||n||Math.random().toString(36).substr(2,8)})}function I(e){var t=e.pathname,r=void 0===t?"/":t,n=e.search,a=void 0===n?"":n,o=e.hash,i=void 0===o?"":o;return a&&"?"!==a&&(r+="?"===a.charAt(0)?a:"?"+a),i&&"#"!==i&&(r+="#"===i.charAt(0)?i:"#"+i),r}function N(e){var t={};if(e){var r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));var n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}function B(e,t,r,a){void 0===a&&(a={});var o=a.window,i=void 0===o?document.defaultView:o,u=a.v5Compat,s=void 0!==u&&u,c=i.history,l=n.Pop,f=null,d=h();function h(){return(c.state||{idx:null}).idx}function v(){l=n.Pop;var e=h(),t=null==e?null:e-d;d=e,f&&f({action:l,location:y.location,delta:t})}function p(e){var t="null"!==i.location.origin?i.location.origin:i.location.href,r="string"==typeof e?e:I(e);return O(t,"No window.location.(origin|href) available to create URL for href: "+(r=r.replace(/ $/,"%20"))),new URL(r,t)}null==d&&(d=0,c.replaceState(D({},c.state,{idx:d}),""));var y={get action(){return l},get location(){return e(i,c)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(_,v),f=e,function(){i.removeEventListener(_,v),f=null}},createHref:function(e){return t(i,e)},createURL:p,encodeLocation:function(e){var t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l=n.Push;var a=F(y.location,e,t);r&&r(a,e);var o=U(a,d=h()+1),u=y.createHref(a);try{c.pushState(o,"",u)}catch(e){if(m(e,DOMException)&&"DataCloneError"===e.name)throw e;i.location.assign(u)}s&&f&&f({action:l,location:y.location,delta:1})},replace:function(e,t){l=n.Replace;var a=F(y.location,e,t);r&&r(a,e);var o=U(a,d=h()),i=y.createHref(a);c.replaceState(o,"",i),s&&f&&f({action:l,location:y.location,delta:0})},go:function(e){return c.go(e)}};return y}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(L||(L={}));var z=new Set(["lazy","caseSensitive","path","id","index","children"]);function H(e,t,r,n){return void 0===r&&(r=[]),void 0===n&&(n={}),e.map(function(e,a){var o=S(r).concat([String(a)]),i="string"==typeof e.id?e.id:o.join("-");if(O(!0!==e.index||!e.children,"Cannot specify children on an index route"),O(!n[i],'Found a route id collision on id "'+i+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var u=D({},e,t(e),{id:i});return n[i]=u,u}var s=D({},e,t(e),{id:i,children:void 0});return n[i]=s,e.children&&(s.children=H(e.children,t,o,n)),s})}function W(e,t,r){return void 0===r&&(r="/"),K(e,t,r,!1)}function K(e,t,r,n){var a=ie(("string"==typeof t?N(t):t).pathname||"/",r);if(null==a)return null;var o=V(e);!function(e){e.sort(function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var r=e.length===t.length&&e.slice(0,-1).every(function(e,r){return e===t[r]});return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(function(e){return e.childrenIndex}),t.routesMeta.map(function(e){return e.childrenIndex}))})}(o);for(var i=null,u=0;null==i&&u<o.length;++u){var s=oe(a);i=re(o[u],s,n)}return i}function $(e,t){var r=e.route,n=e.pathname,a=e.params;return{id:r.id,pathname:n,params:a,data:t[r.id],handle:r.handle}}function V(e,t,r,n){void 0===t&&(t=[]),void 0===r&&(r=[]),void 0===n&&(n="");var a=function(e,a,o){var i={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:a,route:e};i.relativePath.startsWith("/")&&(O(i.relativePath.startsWith(n),'Absolute route path "'+i.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(n.length));var u=de([n,i.relativePath]),s=r.concat(i);e.children&&e.children.length>0&&(O(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+u+'".'),V(e.children,t,s,u)),(null!=e.path||e.index)&&t.push({path:u,score:te(u,e.index),routesMeta:s})};return e.forEach(function(e,t){var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?")){var n=!0,o=!1,i=void 0;try{for(var u,s=J(e.path)[Symbol.iterator]();!(n=(u=s.next()).done);n=!0){var c=u.value;a(e,t,c)}}catch(e){o=!0,i=e}finally{try{n||null==s.return||s.return()}finally{if(o)throw i}}}else a(e,t)}),t}function J(e){var t,r=e.split("/");if(0===r.length)return[];var n,a=s(n=r)||y(n)||R(n)||b(),o=a[0],i=a.slice(1),u=o.endsWith("?"),c=o.replace(/\?$/,"");if(0===i.length)return u?[c,""]:[c];var l,f=J(i.join("/")),d=[];return(t=d).push.apply(t,S(f.map(function(e){return""===e?c:[c,e].join("/")}))),u&&(l=d).push.apply(l,S(f)),d.map(function(t){return e.startsWith("/")&&""===t?"/":t})}var q=/^:[\w-]+$/,Y=3,X=2,G=1,Q=10,Z=-2,ee=function(e){return"*"===e};function te(e,t){var r=e.split("/"),n=r.length;return r.some(ee)&&(n+=Z),t&&(n+=X),r.filter(function(e){return!ee(e)}).reduce(function(e,t){return e+(q.test(t)?Y:""===t?G:Q)},n)}function re(e,t,r){void 0===r&&(r=!1);for(var n=e.routesMeta,a={},o="/",i=[],u=0;u<n.length;++u){var s=n[u],c=u===n.length-1,l="/"===o?t:t.slice(o.length)||"/",f=ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!f&&c&&r&&!n[n.length-1].route.index&&(f=ae({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!f)return null;Object.assign(a,f.params),i.push({params:a,pathname:de([o,f.pathname]),pathnameBase:he(de([o,f.pathnameBase])),route:d}),"/"!==f.pathnameBase&&(o=de([o,f.pathnameBase]))}return i}function ne(e,t){void 0===t&&(t={});var r=e;r.endsWith("*")&&"*"!==r&&!r.endsWith("/*")&&(M(!1,'Route path "'+r+'" will be treated as if it were "'+r.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+r.replace(/\*$/,"/*")+'".'),r=r.replace(/\*$/,"/*"));var n=r.startsWith("/")?"/":"",a=function(e){return null==e?"":"string"==typeof e?e:String(e)};return n+r.split(/\/+/).map(function(e,r,n){if(r===n.length-1&&"*"===e)return a(t["*"]);var o=e.match(/^:([\w-]+)(\??)$/);if(o){var i=w(o,3),u=i[1],s=i[2],c=t[u];return O("?"===s||null!=c,'Missing ":'+u+'" param'),a(c)}return e.replace(/\?$/g,"")}).filter(function(e){return!!e}).join("/")}function ae(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});var r=w(function(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!0),M("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were "'+e.replace(/\*$/,"/*")+'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "'+e.replace(/\*$/,"/*")+'".');var n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,function(e,t,r){return n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)"});return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),2),n=r[0],a=r[1],o=t.match(n);if(!o)return null;var i=o[0],u=i.replace(/(.)\/+$/,"$1"),s=o.slice(1);return{params:a.reduce(function(e,t,r){var n=t.paramName,a=t.isOptional;if("*"===n){var o=s[r]||"";u=i.slice(0,i.length-o.length).replace(/(.)\/+$/,"$1")}var c=s[r];return e[n]=a&&!c?void 0:(c||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:u,pattern:e}}function oe(e){try{return e.split("/").map(function(e){return decodeURIComponent(e).replace(/\//g,"%2F")}).join("/")}catch(t){return M(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function ie(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;var r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function ue(e,t){void 0===t&&(t="/");var r="string"==typeof e?N(e):e,n=r.pathname,a=r.search,o=void 0===a?"":a,i=r.hash,u=void 0===i?"":i,s=n?n.startsWith("/")?n:function(e,t){var r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(function(e){".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}(n,t):t;return{pathname:s,search:ve(o),hash:pe(u)}}function se(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function ce(e){return e.filter(function(e,t){return 0===t||e.route.path&&e.route.path.length>0})}function le(e,t){var r=ce(e);return t?r.map(function(e,t){return t===r.length-1?e.pathname:e.pathnameBase}):r.map(function(e){return e.pathnameBase})}function fe(e,t,r,n){var a;void 0===n&&(n=!1),"string"==typeof e?a=N(e):(O(!(a=D({},e)).pathname||!a.pathname.includes("?"),se("?","pathname","search",a)),O(!a.pathname||!a.pathname.includes("#"),se("#","pathname","hash",a)),O(!a.search||!a.search.includes("#"),se("#","search","hash",a)));var o,i=""===e||""===a.pathname,u=i?"/":a.pathname;if(null==u)o=r;else{var s=t.length-1;if(!n&&u.startsWith("..")){for(var c=u.split("/");".."===c[0];)c.shift(),s-=1;a.pathname=c.join("/")}o=s>=0?t[s]:"/"}var l=ue(a,o),f=u&&"/"!==u&&u.endsWith("/"),d=(i||"."===u)&&r.endsWith("/");return l.pathname.endsWith("/")||!f&&!d||(l.pathname+="/"),l}var de=function(e){return e.join("/").replace(/\/\/+/g,"/")},he=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},ve=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},pe=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},me=function(e,t){void 0===t&&(t={});var r="number"==typeof t?{status:t}:t,n=new Headers(r.headers);return n.has("Content-Type")||n.set("Content-Type","application/json; charset=utf-8"),new Response(JSON.stringify(e),D({},r,{headers:n}))},ye=function(e){function t(){return f(this,t),e=this,n=arguments,r=p(r=t),a=e,!(o=k()?Reflect.construct(r,n||[],p(e).constructor):r.apply(e,n))||"object"!==E(o)&&"function"!=typeof o?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(a):o;var e,r,n,a,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(t,e),t}(x(Error)),be=function(){function e(t,r){var n,a=this;f(this,e),this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],O(t&&"object"===(void 0===t?"undefined":E(t))&&!Array.isArray(t),"defer() only accepts plain objects"),this.abortPromise=new Promise(function(e,t){return n=t}),this.controller=new AbortController;var o=function(){return n(new ye("Deferred data aborted"))};this.unlistenAbortSignal=function(){return a.controller.signal.removeEventListener("abort",o)},this.controller.signal.addEventListener("abort",o),this.data=Object.entries(t).reduce(function(e,t){var r=w(t,2),n=r[0],o=r[1];return Object.assign(e,v({},n,a.trackPromise(n,o)))},{}),this.done&&this.unlistenAbortSignal(),this.init=r}var t,r;return t=e,(r=[{key:"trackPromise",value:function(e,t){var r=this;if(!m(t,Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);var n=Promise.race([t,this.abortPromise]).then(function(t){return r.onSettle(n,e,void 0,t)},function(t){return r.onSettle(n,e,t)});return n.catch(function(){}),Object.defineProperty(n,"_tracked",{get:function(){return!0}}),n}},{key:"onSettle",value:function(e,t,r,n){if(this.controller.signal.aborted&&m(r,ye))return this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:function(){return r}}),Promise.reject(r);if(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),void 0===r&&void 0===n){var a=new Error('Deferred data for key "'+t+'" resolved/rejected with `undefined`, you must resolve/reject with a value or `null`.');return Object.defineProperty(e,"_error",{get:function(){return a}}),this.emit(!1,t),Promise.reject(a)}return void 0===n?(Object.defineProperty(e,"_error",{get:function(){return r}}),this.emit(!1,t),Promise.reject(r)):(Object.defineProperty(e,"_data",{get:function(){return n}}),this.emit(!1,t),n)}},{key:"emit",value:function(e,t){this.subscribers.forEach(function(r){return r(e,t)})}},{key:"subscribe",value:function(e){var t=this;return this.subscribers.add(e),function(){return t.subscribers.delete(e)}}},{key:"cancel",value:function(){var e=this;this.controller.abort(),this.pendingKeysSet.forEach(function(t,r){return e.pendingKeysSet.delete(r)}),this.emit(!0)}},{key:"resolveData",value:function(e){return l(function(){var t,r,n;return C(this,function(a){switch(a.label){case 0:return t=this,r=!1,this.done?[3,2]:(n=function(){return t.cancel()},e.addEventListener("abort",n),[4,new Promise(function(r){t.subscribe(function(a){e.removeEventListener("abort",n),(a||t.done)&&r(a)})})]);case 1:r=a.sent(),a.label=2;case 2:return[2,r]}})}).call(this)}},{key:"done",get:function(){return 0===this.pendingKeysSet.size}},{key:"unwrappedData",get:function(){return O(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce(function(e,t){var r=w(t,2),n=r[0],a=r[1];return Object.assign(e,v({},n,function(e){if(!function(e){return m(e,Promise)&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}(a)))},{})}},{key:"pendingKeys",get:function(){return Array.from(this.pendingKeysSet)}}])&&h(t.prototype,r),e}(),ge=function(e,t){return void 0===t&&(t={}),new be(e,"number"==typeof t?{status:t}:t)},we=function(e,t){void 0===t&&(t=302);var r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);var n=new Headers(r.headers);return n.set("Location",e),new Response(null,D({},r,{headers:n}))},Se=function(e,t){var r=we(e,t);return r.headers.set("X-Remix-Reload-Document","true"),r},Ee=function(e,t){var r=we(e,t);return r.headers.set("X-Remix-Replace","true"),r},Re=function e(t,r,n,a){f(this,e),void 0===a&&(a=!1),this.status=t,this.statusText=r||"",this.internal=a,m(n,Error)?(this.data=n.toString(),this.error=n):this.data=n};function xe(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var ke=["post","put","patch","delete"],Ce=new Set(ke),Pe=["get"].concat(S(ke)),De=new Set(Pe),Le=new Set([301,302,303,307,308]),_e=new Set([307,308]),Ae={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Te={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},je={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Oe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Me=function(e){return{hasErrorBoundary:Boolean(e.hasErrorBoundary)}},Ue="remix-router-transitions";function Fe(e){var t,r=e.window?e.window:"undefined"!=typeof window?window:void 0,a=void 0!==r&&void 0!==r.document&&void 0!==r.document.createElement,o=!a;if(O(e.routes.length>0,"You must provide a non-empty routes array to createRouter"),e.mapRouteProperties)t=e.mapRouteProperties;else if(e.detectErrorBoundary){var i=e.detectErrorBoundary;t=function(e){return{hasErrorBoundary:i(e)}}}else t=Me;var u,s,c,f={},d=H(e.routes,t,void 0,f),h=e.basename||"/",p=e.dataStrategy||Je,y=e.patchRoutesOnNavigation,b=D({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,R=new Set,x=null,k=null,_=null,A=null!=e.hydrationData,T=W(d,e.history.location,h),j=!1,U=null;if(null==T&&!y){var I=it(404,{pathname:e.history.location.pathname}),N=ot(d);T=N.matches,U=v({},N.route.id,I)}if(T&&!e.hydrationData&&Lt(T,d,e.history.location.pathname).active&&(T=null),T)if(T.some(function(e){return e.route.lazy}))s=!1;else if(T.some(function(e){return e.route.loader}))if(b.v7_partialHydration){var B=e.hydrationData?e.hydrationData.loaderData:null,z=e.hydrationData?e.hydrationData.errors:null;if(z){var V=T.findIndex(function(e){return void 0!==z[e.route.id]});s=T.slice(0,V+1).every(function(e){return!He(e.route,B,z)})}else s=T.every(function(e){return!He(e.route,B,z)})}else s=null!=e.hydrationData;else s=!0;else if(s=!1,T=[],b.v7_partialHydration){var J=Lt(null,d,e.history.location.pathname);J.active&&J.matches&&(j=!0,T=J.matches)}var q,Y={historyAction:e.history.action,location:e.history.location,matches:T,initialized:s,navigation:Ae,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||U,fetchers:new Map,blockers:new Map},X=n.Pop,G=!1,Q=!1,Z=new Map,ee=null,te=!1,re=!1,ne=[],ae=new Set,oe=new Map,ue=0,se=-1,ce=new Map,le=new Set,fe=new Map,de=new Map,he=new Set,ve=new Map,pe=new Map,me=void 0;function ye(e,t){void 0===t&&(t={}),Y=D({},Y,e);var r=[],n=[];b.v7_fetcherPersist&&Y.fetchers.forEach(function(e,t){"idle"===e.state&&(he.has(t)?n.push(t):r.push(t))}),he.forEach(function(e){Y.fetchers.has(e)||oe.has(e)||n.push(e)}),S(R).forEach(function(e){return e(Y,{deletedFetchers:n,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})}),b.v7_fetcherPersist?(r.forEach(function(e){return Y.fetchers.delete(e)}),n.forEach(function(e){return Ke(e)})):n.forEach(function(e){return he.delete(e)})}function be(t,r,a){var o,i,s,c=(void 0===a?{}:a).flushSync,l=null!=Y.actionData&&null!=Y.navigation.formMethod&&vt(Y.navigation.formMethod)&&"loading"===Y.navigation.state&&!0!==(null==(o=t.state)?void 0:o._isRedirect);s=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:l?Y.actionData:null;var f=r.loaderData?rt(Y.loaderData,r.loaderData,r.matches||[],r.errors):Y.loaderData,h=Y.blockers;h.size>0&&(h=new Map(h)).forEach(function(e,t){return h.set(t,je)});var v,p=!0===G||null!=Y.navigation.formMethod&&vt(Y.navigation.formMethod)&&!0!==(null==(i=t.state)?void 0:i._isRedirect);if(u&&(d=u,u=void 0),te||X===n.Pop||(X===n.Push?e.history.push(t,t.state):X===n.Replace&&e.history.replace(t,t.state)),X===n.Pop){var m=Z.get(Y.location.pathname);m&&m.has(t.pathname)?v={currentLocation:Y.location,nextLocation:t}:Z.has(t.pathname)&&(v={currentLocation:t,nextLocation:Y.location})}else if(Q){var y=Z.get(Y.location.pathname);y?y.add(t.pathname):(y=new Set([t.pathname]),Z.set(Y.location.pathname,y)),v={currentLocation:Y.location,nextLocation:t}}ye(D({},r,{actionData:s,loaderData:f,historyAction:X,location:t,initialized:!0,navigation:Ae,revalidation:"idle",restoreScrollPosition:Dt(t,r.matches||Y.matches),preventScrollReset:p,blockers:h}),{viewTransitionOpts:v,flushSync:!0===c}),X=n.Pop,G=!1,Q=!1,te=!1,re=!1,ne=[]}function ge(t,r,n){return l(function(){var a,o,i,s,c,l,f,p,m,y,b,g,S,E,R,k,P,A,T,O;return C(this,function(C){switch(C.label){case 0:return q&&q.abort(),q=null,X=t,te=!0===(n&&n.startUninterruptedRevalidation),function(e,t){if(x&&_){var r=Pt(e,t);x[r]=_()}}(Y.location,Y.matches),G=!0===(n&&n.preventScrollReset),Q=!0===(n&&n.enableViewTransition),a=u||d,o=n&&n.overrideNavigation,i=null!=n&&n.initialHydration&&Y.matches&&Y.matches.length>0&&!j?Y.matches:W(a,r,h),s=!0===(n&&n.flushSync),!i||!Y.initialized||re||(M=Y.location,U=r,M.pathname!==U.pathname||M.search!==U.search||(""===M.hash||M.hash!==U.hash)&&""===U.hash)||n&&n.submission&&vt(n.submission.formMethod)?((c=Lt(i,a,r.pathname)).active&&c.matches&&(i=c.matches),i?(q=new AbortController,y=Qe(e.history,r,q.signal,n&&n.submission),n&&n.pendingError?(b=[at(i).route.id,{type:L.error,error:n.pendingError}],[3,3]):[3,1]):(l=kt(r.pathname),f=l.error,p=l.notFoundMatches,m=l.route,be(r,{matches:p,loaderData:{},errors:v({},m.id,f)},{flushSync:s}),[2])):(be(r,{matches:i},{flushSync:s}),[2]);case 1:return n&&n.submission&&vt(n.submission.formMethod)?[4,we(y,r,n.submission,i,c.active,{replace:n.replace,flushSync:s})]:[3,3];case 2:if((g=C.sent()).shortCircuited)return[2];if(g.pendingActionResult&&(S=w(g.pendingActionResult,2),E=S[0],lt(R=S[1])&&xe(R.error)&&404===R.error.status))return q=null,be(r,{matches:g.matches,loaderData:{},errors:v({},E,R.error)}),[2];i=g.matches||i,b=g.pendingActionResult,o=St(r,n.submission),s=!1,c.active=!1,y=Qe(e.history,y.url,y.signal),C.label=3;case 3:return[4,Se(y,r,i,c.active,o,n&&n.submission,n&&n.fetcherSubmission,n&&n.replace,n&&!0===n.initialHydration,s,b)];case 4:return k=C.sent(),P=k.shortCircuited,A=k.matches,T=k.loaderData,O=k.errors,P||(q=null,be(r,D({matches:A||i},nt(b),{loaderData:T,errors:O}))),[2]}var M,U})})()}function we(e,t,r,a,o,i){return l(function(){var u,s,c,l,f,d,v,p,m,y,b,g,w;return C(this,function(S){switch(S.label){case 0:return void 0===i&&(i={}),De(),u=function(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}(t,r),ye({navigation:u},{flushSync:!0===i.flushSync}),o?[4,_t(a,t.pathname,e.signal)]:[3,2];case 1:if("aborted"===(s=S.sent()).type)return[2,{shortCircuited:!0}];if("error"===s.type)return c=at(s.partialMatches).route.id,[2,{matches:s.partialMatches,pendingActionResult:[c,{type:L.error,error:s.error}]}];if(!s.matches)return l=kt(t.pathname),f=l.notFoundMatches,d=l.error,v=l.route,[2,{matches:f,pendingActionResult:[v.id,{type:L.error,error:d}]}];a=s.matches,S.label=2;case 2:return(m=gt(a,t)).route.action||m.route.lazy?[3,3]:(p={type:L.error,error:it(405,{method:e.method,pathname:t.pathname,routeId:m.route.id})},[3,5]);case 3:return[4,Ce("action",Y,e,[m],a,null)];case 4:if(y=S.sent(),p=y[m.route.id],e.signal.aborted)return[2,{shortCircuited:!0}];S.label=5;case 5:return ft(p)?(i&&null!=i.replace?b=i.replace:(g=Ge(p.response.headers.get("Location"),new URL(e.url),h),b=g===Y.location.pathname+Y.location.search),[4,ke(e,p,!0,{submission:r,replace:b})]):[3,7];case 6:return S.sent(),[2,{shortCircuited:!0}];case 7:if(ct(p))throw it(400,{type:"defer-action"});return lt(p)?(w=at(a,m.route.id),!0!==(i&&i.replace)&&(X=n.Push),[2,{matches:a,pendingActionResult:[w.route.id,p]}]):[2,{matches:a,pendingActionResult:[m.route.id,p]}]}})})()}function Se(t,r,n,a,o,i,s,c,f,p,m){return l(function(){var l,y,g,S,E,R,x,k,P,L,_,A,T,j,O,M,U,F,I,N,B,z,H,W,K,$,V,J;return C(this,function(C){switch(C.label){case 0:return l=o||St(r,i),y=i||s||wt(l),g=!(te||b.v7_partialHydration&&f),a?(g&&(S=Ee(m),ye(D({navigation:l},void 0!==S?{actionData:S}:{}),{flushSync:p})),[4,_t(n,r.pathname,t.signal)]):[3,2];case 1:if("aborted"===(E=C.sent()).type)return[2,{shortCircuited:!0}];if("error"===E.type)return R=at(E.partialMatches).route.id,[2,{matches:E.partialMatches,loaderData:{},errors:v({},R,E.error)}];if(!E.matches)return x=kt(r.pathname),k=x.error,P=x.notFoundMatches,L=x.route,[2,{matches:P,loaderData:{},errors:v({},L.id,k)}];n=E.matches,C.label=2;case 2:return _=u||d,A=w(ze(e.history,Y,n,y,r,b.v7_partialHydration&&!0===f,b.v7_skipActionErrorRevalidation,re,ne,ae,he,fe,le,_,h,m),2),T=A[0],j=A[1],Ct(function(e){return!(n&&n.some(function(t){return t.route.id===e}))||T&&T.some(function(t){return t.route.id===e})}),se=++ue,0===T.length&&0===j.length?(O=Ze(),be(r,D({matches:n,loaderData:{},errors:m&<(m[1])?v({},m[0],m[1].error):null},nt(m),O?{fetchers:new Map(Y.fetchers)}:{}),{flushSync:p}),[2,{shortCircuited:!0}]):(g&&(M={},a||(M.navigation=l,void 0!==(U=Ee(m))&&(M.actionData=U)),j.length>0&&(M.fetchers=function(e){return e.forEach(function(e){var t=Y.fetchers.get(e.key),r=Et(void 0,t?t.data:void 0);Y.fetchers.set(e.key,r)}),new Map(Y.fetchers)}(j)),ye(M,{flushSync:p})),j.forEach(function(e){Ve(e.key),e.controller&&oe.set(e.key,e.controller)}),F=function(){return j.forEach(function(e){return Ve(e.key)})},q&&q.signal.addEventListener("abort",F),[4,Pe(Y,n,T,j,t)]);case 3:return I=C.sent(),N=I.loaderResults,B=I.fetcherResults,t.signal.aborted?[2,{shortCircuited:!0}]:(q&&q.signal.removeEventListener("abort",F),j.forEach(function(e){return oe.delete(e.key)}),(z=ut(N))?[4,ke(t,z.result,!0,{replace:c})]:[3,5]);case 4:return C.sent(),[2,{shortCircuited:!0}];case 5:return(z=ut(B))?(le.add(z.key),[4,ke(t,z.result,!0,{replace:c})]):[3,7];case 6:return C.sent(),[2,{shortCircuited:!0}];case 7:return H=tt(Y,n,N,m,j,B,ve),W=H.loaderData,K=H.errors,ve.forEach(function(e,t){e.subscribe(function(r){(r||e.done)&&ve.delete(t)})}),b.v7_partialHydration&&f&&Y.errors&&(K=D({},Y.errors,K)),$=Ze(),V=et(se),J=$||V||j.length>0,[2,D({matches:n,loaderData:W,errors:K},J?{fetchers:new Map(Y.fetchers)}:{})]}})})()}function Ee(e){return e&&!lt(e[1])?v({},e[0],e[1].data):Y.actionData?0===Object.keys(Y.actionData).length?null:Y.actionData:void 0}function ke(t,o,i,u){return l(function(){var s,c,l,f,d,v,p,m,y,b,g,w,S,E,R,x;return C(this,function(k){switch(k.label){case 0:return c=(s=void 0===u?{}:u).submission,l=s.fetcherSubmission,f=s.preventScrollReset,d=s.replace,o.response.headers.has("X-Remix-Revalidate")&&(re=!0),O(v=o.response.headers.get("Location"),"Expected a Location header on the redirect Response"),v=Ge(v,new URL(t.url),h),p=F(Y.location,v,{_isRedirect:!0}),a&&(m=!1,o.response.headers.has("X-Remix-Reload-Document")?m=!0:Oe.test(v)&&(y=e.history.createURL(v),m=y.origin!==r.location.origin||null==ie(y.pathname,h)),m)?(d?r.location.replace(v):r.location.assign(v),[2]):(q=null,b=!0===d||o.response.headers.has("X-Remix-Replace")?n.Replace:n.Push,g=Y.navigation,w=g.formMethod,S=g.formAction,E=g.formEncType,!c&&!l&&w&&S&&E&&(c=wt(Y.navigation)),R=c||l,_e.has(o.response.status)&&R&&vt(R.formMethod)?[4,ge(b,p,{submission:D({},R,{formAction:v}),preventScrollReset:f||G,enableViewTransition:i?Q:void 0})]:[3,2]);case 1:return k.sent(),[3,4];case 2:return x=St(p,c),[4,ge(b,p,{overrideNavigation:x,fetcherSubmission:l,preventScrollReset:f||G,enableViewTransition:i?Q:void 0})];case 3:k.sent(),k.label=4;case 4:return[2]}})})()}function Ce(e,r,n,a,o,i){return l(function(){var r,u,s,c,d,v,y,g,S,R,x,k,P;return C(this,function(D){switch(D.label){case 0:u={},D.label=1;case 1:return D.trys.push([1,3,,4]),[4,qe(p,e,0,n,a,o,i,f,t)];case 2:return r=D.sent(),[3,4];case 3:return s=D.sent(),a.forEach(function(e){u[e.route.id]={type:L.error,error:s}}),[2,u];case 4:c=!0,d=!1,v=void 0,D.label=5;case 5:D.trys.push([5,11,12,13]),y=Object.entries(r)[Symbol.iterator](),D.label=6;case 6:return(c=(g=y.next()).done)?[3,10]:(S=w(g.value,2),R=S[0],function(e){return ht(e.result)&&Le.has(e.result.status)}(x=S[1])?(k=x.result,u[R]={type:L.redirect,response:Xe(k,n,R,o,h,b.v7_relativeSplatPath)},[3,9]):[3,7]);case 7:return[4,(_=x,l(function(){var e,t,r,n,a,o,i,u,s,c,l,f,d;return C(this,function(h){switch(h.label){case 0:if(e=_.result,t=_.type,!ht(e))return[3,10];h.label=1;case 1:return h.trys.push([1,8,,9]),(n=e.headers.get("Content-Type"))&&/\bapplication\/json\b/.test(n)?null!=e.body?[3,2]:(r=null,[3,4]):[3,5];case 2:return[4,e.json()];case 3:r=h.sent(),h.label=4;case 4:return[3,7];case 5:return[4,e.text()];case 6:r=h.sent(),h.label=7;case 7:return[3,9];case 8:return a=h.sent(),[2,{type:L.error,error:a}];case 9:return t===L.error?[2,{type:L.error,error:new Re(e.status,e.statusText,r),statusCode:e.status,headers:e.headers}]:[2,{type:L.data,data:r,statusCode:e.status,headers:e.headers}];case 10:return t===L.error?dt(e)?m(e.data,Error)?[2,{type:L.error,error:e.data,statusCode:null==(u=e.init)?void 0:u.status,headers:null!=(s=e.init)&&s.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.error,error:new Re((null==(o=e.init)?void 0:o.status)||500,void 0,e.data),statusCode:xe(e)?e.status:void 0,headers:null!=(i=e.init)&&i.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.error,error:e,statusCode:xe(e)?e.status:void 0}]:(v=e)&&"object"===(void 0===v?"undefined":E(v))&&"object"===E(v.data)&&"function"==typeof v.subscribe&&"function"==typeof v.cancel&&"function"==typeof v.resolveData?[2,{type:L.deferred,deferredData:e,statusCode:null==(c=e.init)?void 0:c.status,headers:(null==(l=e.init)?void 0:l.headers)&&new Headers(e.init.headers)}]:dt(e)?[2,{type:L.data,data:e.data,statusCode:null==(f=e.init)?void 0:f.status,headers:null!=(d=e.init)&&d.headers?new Headers(e.init.headers):void 0}]:[2,{type:L.data,data:e}]}var v})})())];case 8:u[R]=D.sent(),D.label=9;case 9:return c=!0,[3,6];case 10:return[3,13];case 11:return P=D.sent(),d=!0,v=P,[3,13];case 12:try{c||null==y.return||y.return()}finally{if(d)throw v}return[7];case 13:return[2,u]}var _})})()}function Pe(t,r,n,a,o){return l(function(){var i,u,s,c,f;return C(this,function(d){switch(d.label){case 0:return i=t.matches,u=Ce("loader",0,o,n,r,null),s=Promise.all(a.map(function(t){return l(function(){var r,n;return C(this,function(a){switch(a.label){case 0:return t.matches&&t.match&&t.controller?[4,Ce("loader",0,Qe(e.history,t.path,t.controller.signal),[t.match],t.matches,t.key)]:[3,2];case 1:return r=a.sent(),n=r[t.match.route.id],[2,v({},t.key,n)];case 2:return[2,Promise.resolve(v({},t.key,{type:L.error,error:it(404,{pathname:t.path})}))];case 3:return[2]}})})()})),[4,u];case 1:return c=d.sent(),[4,s];case 2:return f=d.sent().reduce(function(e,t){return Object.assign(e,t)},{}),[4,Promise.all([pt(r,c,o.signal,i,t.loaderData),mt(r,f,a)])];case 3:return d.sent(),[2,{loaderResults:c,fetcherResults:f}]}})})()}function De(){var e;re=!0,(e=ne).push.apply(e,S(Ct())),fe.forEach(function(e,t){oe.has(t)&&ae.add(t),Ve(t)})}function Fe(e,t,r){void 0===r&&(r={}),Y.fetchers.set(e,t),ye({fetchers:new Map(Y.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function Be(e,t,r,n){void 0===n&&(n={});var a=at(Y.matches,t);Ke(e),ye({errors:v({},a.route.id,r),fetchers:new Map(Y.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function We(e){return de.set(e,(de.get(e)||0)+1),he.has(e)&&he.delete(e),Y.fetchers.get(e)||Te}function Ke(e){var t=Y.fetchers.get(e);!oe.has(e)||t&&"loading"===t.state&&ce.has(e)||Ve(e),fe.delete(e),ce.delete(e),le.delete(e),b.v7_fetcherPersist&&he.delete(e),ae.delete(e),Y.fetchers.delete(e)}function Ve(e){var t=oe.get(e);t&&(t.abort(),oe.delete(e))}function Ye(e){var t=!0,r=!1,n=void 0;try{for(var a,o=e[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var i=a.value,u=Rt(We(i).data);Y.fetchers.set(i,u)}}catch(e){r=!0,n=e}finally{try{t||null==o.return||o.return()}finally{if(r)throw n}}}function Ze(){var e=[],t=!1,r=!0,n=!1,a=void 0;try{for(var o,i=le[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=o.value,s=Y.fetchers.get(u);O(s,"Expected fetcher: "+u),"loading"===s.state&&(le.delete(u),e.push(u),t=!0)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return Ye(e),t}function et(e){var t=[],r=!0,n=!1,a=void 0;try{for(var o,i=ce[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0];if(u[1]<e){var c=Y.fetchers.get(s);O(c,"Expected fetcher: "+s),"loading"===c.state&&(Ve(s),ce.delete(s),t.push(s))}}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return Ye(t),t.length>0}function st(e){Y.blockers.delete(e),pe.delete(e)}function bt(e,t){var r=Y.blockers.get(e)||je;O("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,"Invalid blocker state transition: "+r.state+" -> "+t.state);var n=new Map(Y.blockers);n.set(e,t),ye({blockers:n})}function xt(e){var t=e.currentLocation,r=e.nextLocation,n=e.historyAction;if(0!==pe.size){pe.size>1&&M(!1,"A router only supports one blocker at a time");var a=Array.from(pe.entries()),o=w(a[a.length-1],2),i=o[0],u=o[1],s=Y.blockers.get(i);if(!s||"proceeding"!==s.state)return u({currentLocation:t,nextLocation:r,historyAction:n})?i:void 0}}function kt(e){var t=it(404,{pathname:e}),r=ot(u||d),n=r.matches,a=r.route;return Ct(),{notFoundMatches:n,route:a,error:t}}function Ct(e){var t=[];return ve.forEach(function(r,n){e&&!e(n)||(r.cancel(),t.push(n),ve.delete(n))}),t}function Pt(e,t){return k&&k(e,t.map(function(e){return $(e,Y.loaderData)}))||e.key}function Dt(e,t){if(x){var r=Pt(e,t),n=x[r];if("number"==typeof n)return n}return null}function Lt(e,t,r){if(y){if(!e)return{active:!0,matches:K(t,r,h,!0)||[]};if(Object.keys(e[0].params).length>0)return{active:!0,matches:K(t,r,h,!0)}}return{active:!1,matches:null}}function _t(e,r,n,a){return l(function(){var o,i,s;return C(this,function(c){switch(c.label){case 0:if(o=function(){var e,o,s,c,l;return C(this,function(v){switch(v.label){case 0:e=null==u,o=u||d,s=f,v.label=1;case 1:return v.trys.push([1,3,4,5]),[4,y({signal:n,path:r,matches:i,fetcherKey:a,patch:function(e,r){n.aborted||$e(e,r,o,s,t)}})];case 2:return v.sent(),[3,5];case 3:return[2,{v:{type:"error",error:v.sent(),partialMatches:i}}];case 4:return e&&!n.aborted&&(d=S(d)),[7];case 5:return n.aborted?[2,{v:{type:"aborted"}}]:(c=W(o,r,h))?[2,{v:{type:"success",matches:c}}]:!(l=K(o,r,h,!0))||i.length===l.length&&i.every(function(e,t){return e.route.id===l[t].route.id})?[2,{v:{type:"success",matches:null}}]:(i=l,[2])}})},!y)return[2,{type:"success",matches:e}];i=e,c.label=1;case 1:return[5,P(o())];case 2:return"object"===E(s=c.sent())?[2,s.v]:[3,1];case 3:return[2]}})})()}return c={get basename(){return h},get future(){return b},get state(){return Y},get routes(){return d},get window(){return r},initialize:function(){if(g=e.history.listen(function(t){var r=t.action,n=t.location,a=t.delta;if(me)return me(),void(me=void 0);M(0===pe.size||null!=a,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var o=xt({currentLocation:Y.location,nextLocation:n,historyAction:r});if(o&&null!=a){var i=new Promise(function(e){me=e});return e.history.go(-1*a),void bt(o,{state:"blocked",location:n,proceed:function(){bt(o,{state:"proceeding",proceed:void 0,reset:void 0,location:n}),i.then(function(){return e.history.go(a)})},reset:function(){var e=new Map(Y.blockers);e.set(o,je),ye({blockers:e})}})}return ge(r,n)}),a){!function(e,t){try{var r=e.sessionStorage.getItem(Ue);if(r){var n=JSON.parse(r),a=!0,o=!1,i=void 0;try{for(var u,s=Object.entries(n||{})[Symbol.iterator]();!(a=(u=s.next()).done);a=!0){var c=w(u.value,2),l=c[0],f=c[1];f&&Array.isArray(f)&&t.set(l,new Set(f||[]))}}catch(e){o=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(o)throw i}}}}catch(e){}}(r,Z);var t=function(){return function(e,t){if(t.size>0){var r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=w(i.value,2),c=s[0],l=s[1];r[c]=S(l)}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}try{e.sessionStorage.setItem(Ue,JSON.stringify(r))}catch(e){M(!1,"Failed to save applied view transitions in sessionStorage ("+e+").")}}}(r,Z)};r.addEventListener("pagehide",t),ee=function(){return r.removeEventListener("pagehide",t)}}return Y.initialized||ge(n.Pop,Y.location,{initialHydration:!0}),c},subscribe:function(e){return R.add(e),function(){return R.delete(e)}},enableScrollRestoration:function(e,t,r){if(x=e,_=t,k=r||null,!A&&Y.navigation===Ae){A=!0;var n=Dt(Y.location,Y.matches);null!=n&&ye({restoreScrollPosition:n})}return function(){x=null,_=null,k=null}},navigate:function t(r,a){return l(function(){var o,i,u,s,c,l,f,d,v,p,m,y;return C(this,function(g){switch(g.label){case 0:return"number"==typeof r?(e.history.go(r),[2]):(o=Ie(Y.location,Y.matches,h,b.v7_prependBasename,r,b.v7_relativeSplatPath,null==a?void 0:a.fromRouteId,null==a?void 0:a.relative),i=Ne(b.v7_normalizeFormMethod,!1,o,a),u=i.path,s=i.submission,c=i.error,l=Y.location,f=D({},f=F(Y.location,u,a&&a.state),e.history.encodeLocation(f)),d=a&&null!=a.replace?a.replace:void 0,v=n.Push,!0===d?v=n.Replace:!1===d||null!=s&&vt(s.formMethod)&&s.formAction===Y.location.pathname+Y.location.search&&(v=n.Replace),p=a&&"preventScrollReset"in a?!0===a.preventScrollReset:void 0,m=!0===(a&&a.flushSync),(y=xt({currentLocation:l,nextLocation:f,historyAction:v}))?(bt(y,{state:"blocked",location:f,proceed:function(){bt(y,{state:"proceeding",proceed:void 0,reset:void 0,location:f}),t(r,a)},reset:function(){var e=new Map(Y.blockers);e.set(y,je),ye({blockers:e})}}),[2]):[4,ge(v,f,{submission:s,pendingError:c,preventScrollReset:p,replace:a&&a.replace,enableViewTransition:a&&a.viewTransition,flushSync:m})]);case 1:return[2,g.sent()]}})})()},fetch:function(t,r,n,a){if(o)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Ve(t);var i=!0===(a&&a.flushSync),s=u||d,c=Ie(Y.location,Y.matches,h,b.v7_prependBasename,n,b.v7_relativeSplatPath,r,null==a?void 0:a.relative),f=W(s,c,h),v=Lt(f,s,c);if(v.active&&v.matches&&(f=v.matches),f){var p=Ne(b.v7_normalizeFormMethod,!0,c,a),m=p.path,y=p.submission,g=p.error;if(g)Be(t,r,g,{flushSync:i});else{var S=gt(f,m),E=!0===(a&&a.preventScrollReset);y&&vt(y.formMethod)?function(t,r,n,a,o,i,s,c,f){l(function(){var l,v,p,m,y,g,S,E,R,x,k,P,D,L,_,A,T,j,M,U,F,I,N,B,z;function H(e){if(!e.route.action&&!e.route.lazy){var a=it(405,{method:f.formMethod,pathname:n,routeId:r});return Be(t,r,a,{flushSync:s}),!0}return!1}return C(this,function(C){switch(C.label){case 0:return De(),fe.delete(t),!i&&H(a)?[2]:(l=Y.fetchers.get(t),Fe(t,function(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}(f,l),{flushSync:s}),v=new AbortController,p=Qe(e.history,n,v.signal,f),i?[4,_t(o,new URL(p.url).pathname,p.signal,t)]:[3,2]);case 1:if("aborted"===(m=C.sent()).type)return[2];if("error"===m.type)return Be(t,r,m.error,{flushSync:s}),[2];if(!m.matches)return Be(t,r,it(404,{pathname:n}),{flushSync:s}),[2];if(o=m.matches,H(a=gt(o,n)))return[2];C.label=2;case 2:return oe.set(t,v),y=ue,[4,Ce("action",0,p,[a],o,t)];case 3:if(g=C.sent(),S=g[a.route.id],p.signal.aborted)return oe.get(t)===v&&oe.delete(t),[2];if(b.v7_fetcherPersist&&he.has(t)){if(ft(S)||lt(S))return Fe(t,Rt(void 0)),[2]}else{if(ft(S))return oe.delete(t),se>y?(Fe(t,Rt(void 0)),[2]):(le.add(t),Fe(t,Et(f)),[2,ke(p,S,!1,{fetcherSubmission:f,preventScrollReset:c})]);if(lt(S))return Be(t,r,S.error),[2]}if(ct(S))throw it(400,{type:"defer-action"});return E=Y.navigation.location||Y.location,R=Qe(e.history,E,v.signal),x=u||d,O(k="idle"!==Y.navigation.state?W(x,Y.navigation.location,h):Y.matches,"Didn't find any matches after fetcher action"),P=++ue,ce.set(t,P),D=Et(f,S.data),Y.fetchers.set(t,D),L=w(ze(e.history,Y,k,f,E,!1,b.v7_skipActionErrorRevalidation,re,ne,ae,he,fe,le,x,h,[a.route.id,S]),2),_=L[0],(A=L[1]).filter(function(e){return e.key!==t}).forEach(function(e){var t=e.key,r=Y.fetchers.get(t),n=Et(void 0,r?r.data:void 0);Y.fetchers.set(t,n),Ve(t),e.controller&&oe.set(t,e.controller)}),ye({fetchers:new Map(Y.fetchers)}),T=function(){return A.forEach(function(e){return Ve(e.key)})},v.signal.addEventListener("abort",T),[4,Pe(Y,k,_,A,R)];case 4:return j=C.sent(),M=j.loaderResults,U=j.fetcherResults,v.signal.aborted?[2]:(v.signal.removeEventListener("abort",T),ce.delete(t),oe.delete(t),A.forEach(function(e){return oe.delete(e.key)}),(F=ut(M))?[2,ke(R,F.result,!1,{preventScrollReset:c})]:(F=ut(U))?(le.add(F.key),[2,ke(R,F.result,!1,{preventScrollReset:c})]):(I=tt(Y,k,M,void 0,A,U,ve),N=I.loaderData,B=I.errors,Y.fetchers.has(t)&&(z=Rt(S.data),Y.fetchers.set(t,z)),et(P),"loading"===Y.navigation.state&&P>se?(O(X,"Expected pending action"),q&&q.abort(),be(Y.navigation.location,{matches:k,loaderData:N,errors:B,fetchers:new Map(Y.fetchers)})):(ye({errors:B,loaderData:rt(Y.loaderData,N,k,B),fetchers:new Map(Y.fetchers)}),re=!1),[2]))}})})()}(t,r,m,S,f,v.active,i,E,y):(fe.set(t,{routeId:r,path:m}),function(t,r,n,a,o,i,u,s,c){l(function(){var l,f,d,h,v,p,m;return C(this,function(y){switch(y.label){case 0:return l=Y.fetchers.get(t),Fe(t,Et(c,l?l.data:void 0),{flushSync:u}),f=new AbortController,d=Qe(e.history,n,f.signal),i?[4,_t(o,new URL(d.url).pathname,d.signal,t)]:[3,2];case 1:if("aborted"===(h=y.sent()).type)return[2];if("error"===h.type)return Be(t,r,h.error,{flushSync:u}),[2];if(!h.matches)return Be(t,r,it(404,{pathname:n}),{flushSync:u}),[2];o=h.matches,a=gt(o,n),y.label=2;case 2:return oe.set(t,f),v=ue,[4,Ce("loader",0,d,[a],o,t)];case 3:return p=y.sent(),ct(m=p[a.route.id])?[4,yt(m,d.signal,!0)]:[3,5];case 4:m=y.sent()||m,y.label=5;case 5:return oe.get(t)===f&&oe.delete(t),d.signal.aborted?[2]:he.has(t)?(Fe(t,Rt(void 0)),[2]):ft(m)?se>v?(Fe(t,Rt(void 0)),[2]):[3,6]:[3,8];case 6:return le.add(t),[4,ke(d,m,!1,{preventScrollReset:s})];case 7:return y.sent(),[2];case 8:return lt(m)?(Be(t,r,m.error),[2]):(O(!ct(m),"Unhandled fetcher deferred data"),Fe(t,Rt(m.data)),[2])}})})()}(t,r,m,S,f,v.active,i,E,y))}}else Be(t,r,it(404,{pathname:c}),{flushSync:i})},revalidate:function(){De(),ye({revalidation:"loading"}),"submitting"!==Y.navigation.state&&("idle"!==Y.navigation.state?ge(X||Y.historyAction,Y.navigation.location,{overrideNavigation:Y.navigation,enableViewTransition:!0===Q}):ge(Y.historyAction,Y.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:We,deleteFetcher:function(e){var t=(de.get(e)||0)-1;t<=0?(de.delete(e),he.add(e),b.v7_fetcherPersist||Ke(e)):de.set(e,t),ye({fetchers:new Map(Y.fetchers)})},dispose:function(){g&&g(),ee&&ee(),R.clear(),q&&q.abort(),Y.fetchers.forEach(function(e,t){return Ke(t)}),Y.blockers.forEach(function(e,t){return st(t)})},getBlocker:function(e,t){var r=Y.blockers.get(e)||je;return pe.get(e)!==t&&pe.set(e,t),r},deleteBlocker:st,patchRoutes:function(e,r){var n=null==u;$e(e,r,u||d,f,t),n&&(d=S(d),ye({}))},_internalFetchControllers:oe,_internalActiveDeferreds:ve,_internalSetRoutes:function(e){u=H(e,t,void 0,f={})}},c}function Ie(e,t,r,n,a,o,i,u){var s,c;if(i){s=[];var l=!0,f=!1,d=void 0;try{for(var h,v=t[Symbol.iterator]();!(l=(h=v.next()).done);l=!0){var p=h.value;if(s.push(p),p.route.id===i){c=p;break}}}catch(e){f=!0,d=e}finally{try{l||null==v.return||v.return()}finally{if(f)throw d}}}else s=t,c=t[t.length-1];var m=fe(a||".",le(s,o),ie(e.pathname,r)||e.pathname,"path"===u);if(null==a&&(m.search=e.search,m.hash=e.hash),(null==a||""===a||"."===a)&&c){var y=bt(m.search);if(c.route.index&&!y)m.search=m.search?m.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&y){var b=new URLSearchParams(m.search),g=b.getAll("index");b.delete("index"),g.filter(function(e){return e}).forEach(function(e){return b.append("index",e)});var w=b.toString();m.search=w?"?"+w:""}}return n&&"/"!==r&&(m.pathname="/"===m.pathname?r:de([r,m.pathname])),I(m)}function Ne(e,t,r,n){if(!n||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(n))return{path:r};if(n.formMethod&&(a=n.formMethod,!De.has(a.toLowerCase())))return{path:r,error:it(405,{method:n.formMethod})};var a,o,i,u=function(){return{path:r,error:it(400,{type:"invalid-body"})}},s=n.formMethod||"get",c=e?s.toUpperCase():s.toLowerCase(),l=st(r);if(void 0!==n.body){if("text/plain"===n.formEncType){if(!vt(c))return u();var f="string"==typeof n.body?n.body:m(n.body,FormData)||m(n.body,URLSearchParams)?Array.from(n.body.entries()).reduce(function(e,t){var r=w(t,2);return""+e+r[0]+"="+r[1]+"\n"},""):String(n.body);return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:void 0,text:f}}}if("application/json"===n.formEncType){if(!vt(c))return u();try{var d="string"==typeof n.body?JSON.parse(n.body):n.body;return{path:r,submission:{formMethod:c,formAction:l,formEncType:n.formEncType,formData:void 0,json:d,text:void 0}}}catch(e){return u()}}}if(O("function"==typeof FormData,"FormData is not available in this environment"),n.formData)o=Ze(n.formData),i=n.formData;else if(m(n.body,FormData))o=Ze(n.body),i=n.body;else if(m(n.body,URLSearchParams))i=et(o=n.body);else if(null==n.body)o=new URLSearchParams,i=new FormData;else try{i=et(o=new URLSearchParams(n.body))}catch(e){return u()}var h={formMethod:c,formAction:l,formEncType:n&&n.formEncType||"application/x-www-form-urlencoded",formData:i,json:void 0,text:void 0};if(vt(h.formMethod))return{path:r,submission:h};var v=N(r);return t&&v.search&&bt(v.search)&&o.append("index",""),v.search="?"+o,{path:I(v),submission:h}}function Be(e,t,r){void 0===r&&(r=!1);var n=e.findIndex(function(e){return e.route.id===t});return n>=0?e.slice(0,r?n+1:n):e}function ze(e,t,r,n,a,o,i,u,s,c,l,f,d,h,v,p){var m=p?lt(p[1])?p[1].error:p[1].data:void 0,y=e.createURL(t.location),b=e.createURL(a),g=r;o&&t.errors?g=Be(r,Object.keys(t.errors)[0],!0):p&<(p[1])&&(g=Be(r,p[0]));var w=p?p[1].statusCode:void 0,S=i&&w&&w>=400,E=g.filter(function(e,r){var a=e.route;if(a.lazy)return!0;if(null==a.loader)return!1;if(o)return He(a,t.loaderData,t.errors);if(function(e,t,r){var n=!t||r.route.id!==t.route.id,a=void 0===e[r.route.id];return n||a}(t.loaderData,t.matches[r],e)||s.some(function(t){return t===e.route.id}))return!0;var i=t.matches[r],c=e;return Ke(e,D({currentUrl:y,currentParams:i.params,nextUrl:b,nextParams:c.params},n,{actionResult:m,actionStatus:w,defaultShouldRevalidate:!S&&(u||y.pathname+y.search===b.pathname+b.search||y.search!==b.search||We(i,c))}))}),R=[];return f.forEach(function(e,a){if(!o&&r.some(function(t){return t.route.id===e.routeId})&&!l.has(a)){var i=W(h,e.path,v);if(i){var s=t.fetchers.get(a),f=gt(i,e.path),p=!1;d.has(a)?p=!1:c.has(a)?(c.delete(a),p=!0):p=s&&"idle"!==s.state&&void 0===s.data?u:Ke(f,D({currentUrl:y,currentParams:t.matches[t.matches.length-1].params,nextUrl:b,nextParams:r[r.length-1].params},n,{actionResult:m,actionStatus:w,defaultShouldRevalidate:!S&&u})),p&&R.push({key:a,routeId:e.routeId,path:e.path,matches:i,match:f,controller:new AbortController})}else R.push({key:a,routeId:e.routeId,path:e.path,matches:null,match:null,controller:null})}}),[E,R]}function He(e,t,r){if(e.lazy)return!0;if(!e.loader)return!1;var n=null!=t&&void 0!==t[e.id],a=null!=r&&void 0!==r[e.id];return!(!n&&a)&&("function"==typeof e.loader&&!0===e.loader.hydrate||!n&&!a)}function We(e,t){var r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function Ke(e,t){if(e.route.shouldRevalidate){var r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function $e(e,t,r,n,a){var o,i,u;if(e){var s=n[e];O(s,"No route found to patch children into: routeId = "+e),s.children||(s.children=[]),u=s.children}else u=r;var c=H(t.filter(function(e){return!u.some(function(t){return Ve(e,t)})}),a,[e||"_","patch",String((null==(i=u)?void 0:i.length)||"0")],n);(o=u).push.apply(o,S(c))}function Ve(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||e.children.every(function(e,r){var n;return null==(n=t.children)?void 0:n.some(function(t){return Ve(e,t)})}))}function Je(e){return l(function(){var t,r;return C(this,function(n){switch(n.label){case 0:return t=e.matches,r=t.filter(function(e){return e.shouldLoad}),[4,Promise.all(r.map(function(e){return e.resolve()}))];case 1:return[2,n.sent().reduce(function(e,t,n){return Object.assign(e,v({},r[n].route.id,t))},{})]}})})()}function qe(e,t,r,n,a,o,i,u,s,c){return l(function(){var r,f,d;return C(this,function(h){switch(h.label){case 0:return r=o.map(function(e){return e.route.lazy?function(e,t,r){return l(function(){var n,a,o,i,u;return C(this,function(s){switch(s.label){case 0:return e.lazy?[4,e.lazy()]:[2];case 1:if(n=s.sent(),!e.lazy)return[2];for(var c in O(a=r[e.id],"No route found in manifest"),o={},n)i=a[c],M(!(u=void 0!==i&&"hasErrorBoundary"!==c),'Route "'+a.id+'" has a static property "'+c+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+c+'" will be ignored.'),u||z.has(c)||(o[c]=n[c]);return Object.assign(a,o),Object.assign(a,D({},t(a),{lazy:void 0})),[2]}})})()}(e.route,s,u):void 0}),f=o.map(function(e,o){var i=r[o],u=a.some(function(t){return t.route.id===e.route.id});return D({},e,{shouldLoad:u,resolve:function(r){return l(function(){return C(this,function(a){return r&&"GET"===n.method&&(e.route.lazy||e.route.loader)&&(u=!0),[2,u?Ye(t,n,e,i,r,c):Promise.resolve({type:L.data,result:void 0})]})})()}})}),[4,e({matches:f,request:n,params:o[0].params,fetcherKey:i,context:c})];case 1:d=h.sent(),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,Promise.all(r)];case 3:case 4:return h.sent(),[3,5];case 5:return[2,d]}})})()}function Ye(e,t,r,n,a,o){return l(function(){var i,u,s,c,f,d,h,v,p,m,y;return C(this,function(b){switch(b.label){case 0:s=function(n){var i,s=new Promise(function(e,t){return i=t});u=function(){return i()},t.signal.addEventListener("abort",u);var c=function(a){return"function"!=typeof n?Promise.reject(new Error('You cannot call the handler for a route which defines a boolean "'+e+'" [routeId: '+r.route.id+"]")):n.apply(void 0,[{request:t,params:r.params,context:o}].concat(S(void 0!==a?[a]:[])))},f=l(function(){return C(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,a?a(function(e){return c(e)}):c()];case 1:return[2,{type:"data",result:e.sent()}];case 2:return[2,{type:"error",result:e.sent()}];case 3:return[2]}})})();return Promise.race([f,s])},b.label=1;case 1:return b.trys.push([1,12,13,14]),c=r.route[e],n?c?[4,Promise.all([s(c).catch(function(e){f=e}),n])]:[3,3]:[3,8];case 2:if(d=w.apply(void 0,[b.sent(),1]),h=d[0],void 0!==f)throw f;return i=h,[3,7];case 3:return[4,n];case 4:return b.sent(),(c=r.route[e])?[4,s(c)]:[3,6];case 5:return i=b.sent(),[3,7];case 6:if("action"===e)throw v=new URL(t.url),p=v.pathname+v.search,it(405,{method:t.method,pathname:p,routeId:r.route.id});return[2,{type:L.data,result:void 0}];case 7:return[3,11];case 8:if(c)return[3,9];throw it(404,{pathname:(m=new URL(t.url)).pathname+m.search});case 9:return[4,s(c)];case 10:i=b.sent(),b.label=11;case 11:return O(void 0!==i.result,"You defined "+("action"===e?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+e+"` function. Please return a value or `null`."),[3,14];case 12:return y=b.sent(),[2,{type:L.error,result:y}];case 13:return u&&t.signal.removeEventListener("abort",u),[7];case 14:return[2,i]}})})()}function Xe(e,t,r,n,a,o){var i=e.headers.get("Location");if(O(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!Oe.test(i)){var u=n.slice(0,n.findIndex(function(e){return e.route.id===r})+1);i=Ie(new URL(t.url),u,a,!0,i,o),e.headers.set("Location",i)}return e}function Ge(e,t,r){if(Oe.test(e)){var n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n),o=null!=ie(a.pathname,r);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}return e}function Qe(e,t,r,n){var a=e.createURL(st(t)).toString(),o={signal:r};if(n&&vt(n.formMethod)){var i=n.formMethod,u=n.formEncType;o.method=i.toUpperCase(),"application/json"===u?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):"text/plain"===u?o.body=n.text:"application/x-www-form-urlencoded"===u&&n.formData?o.body=Ze(n.formData):o.body=n.formData}return new Request(a,o)}function Ze(e){var t=new URLSearchParams,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,"string"==typeof c?c:c.name)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function et(e){var t=new FormData,r=!0,n=!1,a=void 0;try{for(var o,i=e.entries()[Symbol.iterator]();!(r=(o=i.next()).done);r=!0){var u=w(o.value,2),s=u[0],c=u[1];t.append(s,c)}}catch(e){n=!0,a=e}finally{try{r||null==i.return||i.return()}finally{if(n)throw a}}return t}function tt(e,t,r,n,a,o,i){var u=function(e,t,r,n,a){var o,i={},u=null,s=!1,c={},l=r&<(r[1])?r[1].error:void 0;return e.forEach(function(r){if(r.route.id in t){var f=r.route.id,d=t[f];if(O(!ft(d),"Cannot handle redirect results in processLoaderData"),lt(d)){var h=d.error;if(void 0!==l&&(h=l,l=void 0),u=u||{},a)u[f]=h;else{var v=at(e,f);null==u[v.route.id]&&(u[v.route.id]=h)}i[f]=void 0,s||(s=!0,o=xe(d.error)?d.error.status:500),d.headers&&(c[f]=d.headers)}else ct(d)?(n.set(f,d.deferredData),i[f]=d.deferredData.data,null==d.statusCode||200===d.statusCode||s||(o=d.statusCode),d.headers&&(c[f]=d.headers)):(i[f]=d.data,d.statusCode&&200!==d.statusCode&&!s&&(o=d.statusCode),d.headers&&(c[f]=d.headers))}}),void 0!==l&&r&&(u=v({},r[0],l),i[r[0]]=void 0),{loaderData:i,errors:u,statusCode:o||200,loaderHeaders:c}}(t,r,n,i,!1),s=u.loaderData,c=u.errors;return a.forEach(function(t){var r=t.key,n=t.match,a=t.controller,i=o[r];if(O(i,"Did not find corresponding fetcher result"),!a||!a.signal.aborted)if(lt(i)){var u=at(e.matches,null==n?void 0:n.route.id);c&&c[u.route.id]||(c=D({},c,v({},u.route.id,i.error))),e.fetchers.delete(r)}else if(ft(i))O(!1,"Unhandled fetcher revalidation redirect");else if(ct(i))O(!1,"Unhandled fetcher deferred data");else{var s=Rt(i.data);e.fetchers.set(r,s)}}),{loaderData:s,errors:c}}function rt(e,t,r,n){var a=D({},t),o=!0,i=!1,u=void 0;try{for(var s,c=r[Symbol.iterator]();!(o=(s=c.next()).done);o=!0){var l=s.value,f=l.route.id;if(t.hasOwnProperty(f)?void 0!==t[f]&&(a[f]=t[f]):void 0!==e[f]&&l.route.loader&&(a[f]=e[f]),n&&n.hasOwnProperty(f))break}}catch(e){i=!0,u=e}finally{try{o||null==c.return||c.return()}finally{if(i)throw u}}return a}function nt(e){return e?lt(e[1])?{actionData:{}}:{actionData:v({},e[0],e[1].data)}:{}}function at(e,t){return(t?e.slice(0,e.findIndex(function(e){return e.route.id===t})+1):S(e)).reverse().find(function(e){return!0===e.route.hasErrorBoundary})||e[0]}function ot(e){var t=1===e.length?e[0]:e.find(function(e){return e.index||!e.path||"/"===e.path})||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function it(e,t){var r=void 0===t?{}:t,n=r.pathname,a=r.routeId,o=r.method,i=r.type,u=(r.message,"Unknown Server Error"),s="Unknown @remix-run/router error";return 400===e?(u="Bad Request",o&&n&&a?s="You made a "+o+' request to "'+n+'" but did not provide a `loader` for route "'+a+'", so there is no way to handle the request.':"defer-action"===i?s="defer() is not supported in actions":"invalid-body"===i&&(s="Unable to encode submission body")):403===e?(u="Forbidden",s='Route "'+a+'" does not match URL "'+n+'"'):404===e?(u="Not Found",s='No route matches URL "'+n+'"'):405===e&&(u="Method Not Allowed",o&&n&&a?s="You made a "+o.toUpperCase()+' request to "'+n+'" but did not provide an `action` for route "'+a+'", so there is no way to handle the request.':o&&(s='Invalid request method "'+o.toUpperCase()+'"')),new Re(e||500,u,new Error(s),!0)}function ut(e){for(var t=Object.entries(e),r=t.length-1;r>=0;r--){var n=w(t[r],2),a=n[0],o=n[1];if(ft(o))return{key:a,result:o}}}function st(e){return I(D({},"string"==typeof e?N(e):e,{hash:""}))}function ct(e){return e.type===L.deferred}function lt(e){return e.type===L.error}function ft(e){return(e&&e.type)===L.redirect}function dt(e){return"object"===(void 0===e?"undefined":E(e))&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function ht(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"===E(e.headers)&&void 0!==e.body}function vt(e){return Ce.has(e.toLowerCase())}function pt(e,t,r,n,a){return l(function(){var o,i,u;return C(this,function(s){switch(s.label){case 0:o=function(o){var u,s,c,l,f,d;return C(this,function(h){switch(h.label){case 0:return u=w(i[o],2),s=u[0],c=u[1],(l=e.find(function(e){return(null==e?void 0:e.route.id)===s}))?(f=n.find(function(e){return e.route.id===l.route.id}),d=null!=f&&!We(f,l)&&void 0!==(a&&a[l.route.id]),ct(c)&&d?[4,yt(c,r,!1).then(function(e){e&&(t[s]=e)})]:[3,2]):[2,"continue"];case 1:h.sent(),h.label=2;case 2:return[2]}})},i=Object.entries(t),u=0,s.label=1;case 1:return u<i.length?[5,P(o(u))]:[3,4];case 2:s.sent(),s.label=3;case 3:return u++,[3,1];case 4:return[2]}})})()}function mt(e,t,r){return l(function(){var n,a;return C(this,function(o){switch(o.label){case 0:n=function(n){var a,o,i,u,s;return C(this,function(c){switch(c.label){case 0:return a=r[n],o=a.key,i=a.routeId,u=a.controller,s=t[o],e.find(function(e){return(null==e?void 0:e.route.id)===i})?ct(s)?(O(u,"Expected an AbortController for revalidating fetcher deferred result"),[4,yt(s,u.signal,!0).then(function(e){e&&(t[o]=e)})]):[3,2]:[2,"continue"];case 1:c.sent(),c.label=2;case 2:return[2]}})},a=0,o.label=1;case 1:return a<r.length?[5,P(n(a))]:[3,4];case 2:o.sent(),o.label=3;case 3:return a++,[3,1];case 4:return[2]}})})()}function yt(e,t,r){return l(function(){return C(this,function(n){switch(n.label){case 0:return void 0===r&&(r=!1),[4,e.deferredData.resolveData(t)];case 1:if(n.sent())return[2];if(r)try{return[2,{type:L.data,data:e.deferredData.unwrappedData}]}catch(e){return[2,{type:L.error,error:e}]}return[2,{type:L.data,data:e.deferredData.data}]}})})()}function bt(e){return new URLSearchParams(e).getAll("index").some(function(e){return""===e})}function gt(e,t){var r="string"==typeof t?N(t).search:t.search;if(e[e.length-1].route.index&&bt(r||""))return e[e.length-1];var n=ce(e);return n[n.length-1]}function wt(e){var t=e.formMethod,r=e.formAction,n=e.formEncType,a=e.text,o=e.formData,i=e.json;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function St(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Et(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Rt(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function xt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function kt(e,t,r){return t=Lt(t),n=e,!(a=Mt()?Reflect.construct(t,r||[],Lt(e).constructor):t.apply(e,r))||"object"!=((o=a)&&"undefined"!=typeof Symbol&&o.constructor===Symbol?"symbol":typeof o)&&"function"!=typeof a?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n):a;var n,a,o}function Ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pt(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function Dt(e,t,r){return t&&Pt(e.prototype,t),r&&Pt(e,r),e}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function _t(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Tt(e,t)}function At(e,t){return null!=t&&"undefined"!=typeof Symbol&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Tt(e,t){return Tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Tt(e,t)}function jt(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||Ot(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ot(e,t){if(e){if("string"==typeof e)return xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xt(e,t):void 0}}function Mt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mt=function(){return!!e})()}function Ut(){return Ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ut.apply(this,arguments)}Symbol("deferred");var Ft=a.createContext(null),It=a.createContext(null),Nt=a.createContext(null),Bt=a.createContext(null),zt=a.createContext(null),Ht=a.createContext({outlet:null,matches:[],isDataRoute:!1}),Wt=a.createContext(null);function Kt(e,t){var r=(void 0===t?{}:t).relative;$t()||O(!1);var n=a.useContext(Bt),o=n.basename,i=n.navigator,u=tr(e,{relative:r}),s=u.hash,c=u.pathname,l=u.search,f=c;return"/"!==o&&(f="/"===c?o:de([o,c])),i.createHref({pathname:f,search:l,hash:s})}function $t(){return null!=a.useContext(zt)}function Vt(){return $t()||O(!1),a.useContext(zt).location}function Jt(){return a.useContext(zt).navigationType}function qt(e){$t()||O(!1);var t=Vt().pathname;return a.useMemo(function(){return ae(e,oe(t))},[t,e])}function Yt(e){a.useContext(Bt).static||a.useLayoutEffect(e)}function Xt(){var e,t,r;return a.useContext(Ht).isDataRoute?(e=fr(cr.UseNavigateStable).router,t=hr(lr.UseNavigateStable),r=a.useRef(!1),Yt(function(){r.current=!0}),a.useCallback(function(n,a){void 0===a&&(a={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Ut({fromRouteId:t},a)))},[e,t])):function(){$t()||O(!1);var e=a.useContext(Ft),t=a.useContext(Bt),r=t.basename,n=t.future,o=t.navigator,i=a.useContext(Ht).matches,u=Vt().pathname,s=JSON.stringify(le(i,n.v7_relativeSplatPath)),c=a.useRef(!1);return Yt(function(){c.current=!0}),a.useCallback(function(t,n){if(void 0===n&&(n={}),c.current)if("number"!=typeof t){var a=fe(t,JSON.parse(s),u,"path"===n.relative);null==e&&"/"!==r&&(a.pathname="/"===a.pathname?r:de([r,a.pathname])),(n.replace?o.replace:o.push)(a,n.state,n)}else o.go(t)},[r,o,s,u,e])}()}var Gt=a.createContext(null);function Qt(){return a.useContext(Gt)}function Zt(e){var t=a.useContext(Ht).outlet;return t?a.createElement(Gt.Provider,{value:e},t):t}function er(){var e=a.useContext(Ht).matches,t=e[e.length-1];return t?t.params:{}}function tr(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Bt).future,o=a.useContext(Ht).matches,i=Vt().pathname,u=JSON.stringify(le(o,n.v7_relativeSplatPath));return a.useMemo(function(){return fe(e,JSON.parse(u),i,"path"===r)},[e,u,i,r])}function rr(e,t){return nr(e,t)}function nr(e,t,r,o){$t()||O(!1);var i,u=a.useContext(Bt).navigator,s=a.useContext(Ht).matches,c=s[s.length-1],l=c?c.params:{},f=(c&&c.pathname,c?c.pathnameBase:"/"),d=(c&&c.route,Vt());if(t){var h,v="string"==typeof t?N(t):t;"/"===f||(null==(h=v.pathname)?void 0:h.startsWith(f))||O(!1),i=v}else i=d;var p=i.pathname||"/",m=p;if("/"!==f){var y=f.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(y.length).join("/")}var b=W(e,{pathname:m}),g=sr(b&&b.map(function(e){return Object.assign({},e,{params:Object.assign({},l,e.params),pathname:de([f,u.encodeLocation?u.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?f:de([f,u.encodeLocation?u.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})}),s,r,o);return t&&g?a.createElement(zt.Provider,{value:{location:Ut({pathname:"/",search:"",hash:"",state:null,key:"default"},i),navigationType:n.Pop}},g):g}function ar(){var e=Sr(),t=xe(e)?e.status+" "+e.statusText:At(e,Error)?e.message:JSON.stringify(e),r=At(e,Error)?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},t),r?a.createElement("pre",{style:n},r):null,null)}var or=a.createElement(ar,null),ir=function(e){function t(e){var r;return Ct(this,t),(r=kt(this,t,[e])).state={location:e.location,revalidation:e.revalidation,error:e.error},r}return _t(t,e),Dt(t,[{key:"componentDidCatch",value:function(e,t){console.error("React Router caught the following error during render",e,t)}},{key:"render",value:function(){return void 0!==this.state.error?a.createElement(Ht.Provider,{value:this.props.routeContext},a.createElement(Wt.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}},{key:"getDerivedStateFromProps",value:function(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}}]),t}(a.Component);function ur(e){var t=e.routeContext,r=e.match,n=e.children,o=a.useContext(Ft);return o&&o.static&&o.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=r.route.id),a.createElement(Ht.Provider,{value:t},n)}function sr(e,t,r,n){var o;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var i;if(!r)return null;if(r.errors)e=r.matches;else{if(!(null!=(i=n)&&i.v7_partialHydration&&0===t.length&&!r.initialized&&r.matches.length>0))return null;e=r.matches}}var u=e,s=null==(o=r)?void 0:o.errors;if(null!=s){var c=u.findIndex(function(e){return e.route.id&&void 0!==(null==s?void 0:s[e.route.id])});c>=0||O(!1),u=u.slice(0,Math.min(u.length,c+1))}var l=!1,f=-1;if(r&&n&&n.v7_partialHydration)for(var d=0;d<u.length;d++){var h=u[d];if((h.route.HydrateFallback||h.route.hydrateFallbackElement)&&(f=d),h.route.id){var v=r.loaderData,p=r.errors,m=h.route.loader&&void 0===v[h.route.id]&&(!p||void 0===p[h.route.id]);if(h.route.lazy||m){l=!0,u=f>=0?u.slice(0,f+1):[u[0]];break}}}return u.reduceRight(function(e,n,o){var i,c,d=!1,h=null,v=null;r&&(i=s&&n.route.id?s[n.route.id]:void 0,h=n.route.errorElement||or,l&&(f<0&&0===o?(Cr[c="route-fallback"]||(Cr[c]=!0),d=!0,v=null):f===o&&(d=!0,v=n.route.hydrateFallbackElement||null)));var p=t.concat(u.slice(0,o+1)),m=function(){var t;return t=i?h:d?v:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(ur,{match:n,routeContext:{outlet:e,matches:p,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===o)?a.createElement(ir,{location:r.location,revalidation:r.revalidation,component:h,error:i,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var cr=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(cr||{}),lr=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(lr||{});function fr(e){var t=a.useContext(Ft);return t||O(!1),t}function dr(e){var t=a.useContext(It);return t||O(!1),t}function hr(e){var t=function(){var e=a.useContext(Ht);return e||O(!1),e}(),r=t.matches[t.matches.length-1];return r.route.id||O(!1),r.route.id}function vr(){return hr(lr.UseRouteId)}function pr(){return dr(lr.UseNavigation).navigation}function mr(){var e=fr(cr.UseRevalidator),t=dr(lr.UseRevalidator);return a.useMemo(function(){return{revalidate:e.router.revalidate,state:t.revalidation}},[e.router.revalidate,t.revalidation])}function yr(){var e=dr(lr.UseMatches),t=e.matches,r=e.loaderData;return a.useMemo(function(){return t.map(function(e){return $(e,r)})},[t,r])}function br(){var e=dr(lr.UseLoaderData),t=hr(lr.UseLoaderData);if(!e.errors||null==e.errors[t])return e.loaderData[t];console.error("You cannot `useLoaderData` in an errorElement (routeId: "+t+")")}function gr(e){return dr(lr.UseRouteLoaderData).loaderData[e]}function wr(){var e=dr(lr.UseActionData),t=hr(lr.UseLoaderData);return e.actionData?e.actionData[t]:void 0}function Sr(){var e,t=a.useContext(Wt),r=dr(lr.UseRouteError),n=hr(lr.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}function Er(){var e=a.useContext(Nt);return null==e?void 0:e._data}function Rr(){var e=a.useContext(Nt);return null==e?void 0:e._error}var xr=0;function kr(e){var t=fr(cr.UseBlocker),r=t.router,n=t.basename,o=dr(lr.UseBlocker),i=jt(a.useState(""),2),u=i[0],s=i[1],c=a.useCallback(function(t){if("function"!=typeof e)return!!e;if("/"===n)return e(t);var r=t.currentLocation,a=t.nextLocation,o=t.historyAction;return e({currentLocation:Ut({},r,{pathname:ie(r.pathname,n)||r.pathname}),nextLocation:Ut({},a,{pathname:ie(a.pathname,n)||a.pathname}),historyAction:o})},[n,e]);return a.useEffect(function(){var e=String(++xr);return s(e),function(){return r.deleteBlocker(e)}},[r]),a.useEffect(function(){""!==u&&r.getBlocker(u,c)},[r,u,c]),u&&o.blockers.has(u)?o.blockers.get(u):je}var Cr={},Pr=function(e,t,r){};function Dr(e,t){void 0===(null==e?void 0:e.v7_startTransition)&&Pr("v7_startTransition","React Router will begin wrapping state updates in `React.startTransition` in v7","https://reactrouter.com/v6/upgrading/future#v7_starttransition"),void 0!==(null==e?void 0:e.v7_relativeSplatPath)||t&&void 0!==t.v7_relativeSplatPath||Pr("v7_relativeSplatPath","Relative route resolution within Splat routes is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath"),t&&(void 0===t.v7_fetcherPersist&&Pr("v7_fetcherPersist","The persistence behavior of fetchers is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist"),void 0===t.v7_normalizeFormMethod&&Pr("v7_normalizeFormMethod","Casing of `formMethod` fields is being normalized to uppercase in v7","https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod"),void 0===t.v7_partialHydration&&Pr("v7_partialHydration","`RouterProvider` hydration behavior is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_partialhydration"),void 0===t.v7_skipActionErrorRevalidation&&Pr("v7_skipActionErrorRevalidation","The revalidation behavior after 4xx/5xx `action` responses is changing in v7","https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation"))}var Lr=a.startTransition;function _r(e){var t=e.basename,r=e.children,n=e.initialEntries,o=e.initialIndex,i=e.future,u=a.useRef();null==u.current&&(u.current=A({initialEntries:n,initialIndex:o,v5Compat:!0}));var s=u.current,c=jt(a.useState({action:s.action,location:s.location}),2),l=c[0],f=c[1],d=(i||{}).v7_startTransition,h=a.useCallback(function(e){d&&Lr?Lr(function(){return f(e)}):f(e)},[f,d]);return a.useLayoutEffect(function(){return s.listen(h)},[s,h]),a.useEffect(function(){return Dr(i)},[i]),a.createElement(Or,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:i})}function Ar(e){var t=e.to,r=e.replace,n=e.state,o=e.relative;$t()||O(!1);var i=a.useContext(Bt),u=i.future,s=(i.static,a.useContext(Ht).matches),c=Vt().pathname,l=Xt(),f=fe(t,le(s,u.v7_relativeSplatPath),c,"path"===o),d=JSON.stringify(f);return a.useEffect(function(){return l(JSON.parse(d),{replace:r,state:n,relative:o})},[l,d,o,r,n]),null}function Tr(e){return Zt(e.context)}function jr(e){O(!1)}function Or(e){var t=e.basename,r=void 0===t?"/":t,o=e.children,i=void 0===o?null:o,u=e.location,s=e.navigationType,c=void 0===s?n.Pop:s,l=e.navigator,f=e.static,d=void 0!==f&&f,h=e.future;$t()&&O(!1);var v=r.replace(/^\/*/,"/"),p=a.useMemo(function(){return{basename:v,navigator:l,static:d,future:Ut({v7_relativeSplatPath:!1},h)}},[v,h,l,d]);"string"==typeof u&&(u=N(u));var m=u.pathname,y=void 0===m?"/":m,b=u.search,g=void 0===b?"":b,w=u.hash,S=void 0===w?"":w,E=u.state,R=void 0===E?null:E,x=u.key,k=void 0===x?"default":x,C=a.useMemo(function(){var e=ie(y,v);return null==e?null:{location:{pathname:e,search:g,hash:S,state:R,key:k},navigationType:c}},[v,y,g,S,R,k,c]);return null==C?null:a.createElement(Bt.Provider,{value:p},a.createElement(zt.Provider,{children:i,value:C}))}function Mr(e){var t=e.children,r=e.location;return rr(zr(t),r)}function Ur(e){var t=e.children,r=e.errorElement,n=e.resolve;return a.createElement(Nr,{resolve:n,errorElement:r},a.createElement(Br,null,t))}var Fr=function(e){return e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error",e}(Fr||{}),Ir=new Promise(function(){}),Nr=function(e){function t(e){var r;return Ct(this,t),(r=kt(this,t,[e])).state={error:null},r}return _t(t,e),Dt(t,[{key:"componentDidCatch",value:function(e,t){console.error("<Await> caught the following error during render",e,t)}},{key:"render",value:function(){var e=this.props,t=e.children,r=e.errorElement,n=e.resolve,o=null,i=Fr.pending;if(At(n,Promise))if(this.state.error){i=Fr.error;var u=this.state.error;o=Promise.reject().catch(function(){}),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_error",{get:function(){return u}})}else n._tracked?i="_error"in(o=n)?Fr.error:"_data"in o?Fr.success:Fr.pending:(i=Fr.pending,Object.defineProperty(n,"_tracked",{get:function(){return!0}}),o=n.then(function(e){return Object.defineProperty(n,"_data",{get:function(){return e}})},function(e){return Object.defineProperty(n,"_error",{get:function(){return e}})}));else i=Fr.success,o=Promise.resolve(),Object.defineProperty(o,"_tracked",{get:function(){return!0}}),Object.defineProperty(o,"_data",{get:function(){return n}});if(i===Fr.error&&At(o._error,ye))throw Ir;if(i===Fr.error&&!r)throw o._error;if(i===Fr.error)return a.createElement(Nt.Provider,{value:o,children:r});if(i===Fr.success)return a.createElement(Nt.Provider,{value:o,children:t});throw o}}],[{key:"getDerivedStateFromError",value:function(e){return{error:e}}}]),t}(a.Component);function Br(e){var t=e.children,r=Er(),n="function"==typeof t?t(r):t;return a.createElement(a.Fragment,null,n)}function zr(e,t){void 0===t&&(t=[]);var r=[];return a.Children.forEach(e,function(e,n){if(a.isValidElement(e)){var o=(u=t,function(e){if(Array.isArray(e))return xt(e)}(u)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(u)||Ot(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([n]);if(e.type!==a.Fragment){e.type!==jr&&O(!1),e.props.index&&e.props.children&&O(!1);var i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=zr(e.props.children,o)),r.push(i)}else r.push.apply(r,zr(e.props.children,o))}var u}),r}function Hr(e){return sr(e)}function Wr(e){var t={hasErrorBoundary:null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&Object.assign(t,{element:a.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:a.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:a.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function Kr(e,t){return Fe({basename:null==t?void 0:t.basename,future:Ut({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:A({initialEntries:null==t?void 0:t.initialEntries,initialIndex:null==t?void 0:t.initialIndex}),hydrationData:null==t?void 0:t.hydrationData,routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation}).initialize()}function $r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function Vr(e,t,r,n,a,o,i){try{var u=e[o](i),s=u.value}catch(e){return void r(e)}u.done?t(s):Promise.resolve(s).then(n,a)}function Jr(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,a,o=[],i=!0,u=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),!t||o.length!==t);i=!0);}catch(e){u=!0,a=e}finally{try{i||null==r.return||r.return()}finally{if(u)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return $r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(r):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function qr(){return qr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},qr.apply(this,arguments)}function Yr(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}var Xr="get",Gr="application/x-www-form-urlencoded";function Qr(e){return null!=e&&"string"==typeof e.tagName}function Zr(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||(t=e,null!=(r=URLSearchParams)&&"undefined"!=typeof Symbol&&r[Symbol.hasInstance]?r[Symbol.hasInstance](t):t instanceof r)?e:Object.keys(e).reduce(function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map(function(e){return[r,e]}):[[r,n]])},[]));var t,r}var en=null,tn=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function rn(e){return null==e||tn.has(e)?e:null}var nn=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],an=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],on=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(e){}function un(e,t){return Fe({basename:null==t?void 0:t.basename,future:qr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:T({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||cn(),routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function sn(e,t){return Fe({basename:null==t?void 0:t.basename,future:qr({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:j({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||cn(),routes:e,mapRouteProperties:Wr,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function cn(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=qr({},t,{errors:ln(t.errors)})),t}function ln(e){if(!e)return null;var t=Object.entries(e),r={},n=!0,a=!1,o=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done);n=!0){var s=Jr(i.value,2),c=s[0],l=s[1];if(l&&"RouteErrorResponse"===l.__type)r[c]=new Re(l.status,l.statusText,l.data,!0===l.internal);else if(l&&"Error"===l.__type){if(l.__subType){var f=window[l.__subType];if("function"==typeof f)try{var d=new f(l.message);d.stack="",r[c]=d}catch(e){}}if(null==r[c]){var h=new Error(l.message);h.stack="",r[c]=h}}else r[c]=l}}catch(e){a=!0,o=e}finally{try{n||null==u.return||u.return()}finally{if(a)throw o}}return r}var fn=a.createContext({isTransitioning:!1}),dn=a.createContext(new Map),hn=a.startTransition,vn=i.flushSync,pn=a.useId;function mn(e){vn?vn(e):e()}var yn=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.status="pending",this.promise=new Promise(function(e,r){t.resolve=function(r){"pending"===t.status&&(t.status="resolved",e(r))},t.reject=function(e){"pending"===t.status&&(t.status="rejected",r(e))}})};function bn(e){var t=e.fallbackElement,r=e.router,n=e.future,o=Jr(a.useState(r.state),2),i=o[0],u=o[1],s=Jr(a.useState(),2),c=s[0],l=s[1],f=Jr(a.useState({isTransitioning:!1}),2),d=f[0],h=f[1],v=Jr(a.useState(),2),p=v[0],m=v[1],y=Jr(a.useState(),2),b=y[0],g=y[1],w=Jr(a.useState(),2),S=w[0],E=w[1],R=a.useRef(new Map),x=(n||{}).v7_startTransition,k=a.useCallback(function(e){x?function(e){hn?hn(e):e()}(e):e()},[x]),C=a.useCallback(function(e,t){var n=t.deletedFetchers,a=t.flushSync,o=t.viewTransitionOpts;e.fetchers.forEach(function(e,t){void 0!==e.data&&R.current.set(t,e.data)}),n.forEach(function(e){return R.current.delete(e)});var i=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(o&&!i){if(a){mn(function(){b&&(p&&p.resolve(),b.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});var s=r.window.document.startViewTransition(function(){mn(function(){return u(e)})});return s.finished.finally(function(){mn(function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})})}),void mn(function(){return g(s)})}b?(p&&p.resolve(),b.skipTransition(),E({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(l(e),h({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?mn(function(){return u(e)}):k(function(){return u(e)})},[r.window,b,p,R,k]);a.useLayoutEffect(function(){return r.subscribe(C)},[r,C]),a.useEffect(function(){d.isTransitioning&&!d.flushSync&&m(new yn)},[d]),a.useEffect(function(){if(p&&c&&r.window){var e=c,t=p.promise,n=r.window.document.startViewTransition(function(){return(r=function(){return function(e,t){var r,n,a,o={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=u(0),i.throw=u(1),i.return=u(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function u(u){return function(s){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,u[0]&&(o=0)),o;)try{if(r=1,n&&(a=2&u[0]?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,n=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!((a=(a=o.trys).length>0&&a[a.length-1])||6!==u[0]&&2!==u[0])){o=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]<a[3])){o.label=u[1];break}if(6===u[0]&&o.label<a[1]){o.label=a[1],a=u;break}if(a&&o.label<a[2]){o.label=a[2],o.ops.push(u);break}a[2]&&o.ops.pop(),o.trys.pop();continue}u=t.call(e,o)}catch(e){u=[6,e],n=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,s])}}}(this,function(r){switch(r.label){case 0:return k(function(){return u(e)}),[4,t];case 1:return r.sent(),[2]}})},function(){var e=this,t=arguments;return new Promise(function(n,a){var o=r.apply(e,t);function i(e){Vr(o,n,a,i,u,"next",e)}function u(e){Vr(o,n,a,i,u,"throw",e)}i(void 0)})})();var r});n.finished.finally(function(){m(void 0),g(void 0),l(void 0),h({isTransitioning:!1})}),g(n)}},[k,c,p,r.window]),a.useEffect(function(){p&&c&&i.location.key===c.location.key&&p.resolve()},[p,b,i.location,c]),a.useEffect(function(){!d.isTransitioning&&S&&(l(S.state),h({isTransitioning:!0,flushSync:!1,currentLocation:S.currentLocation,nextLocation:S.nextLocation}),E(void 0))},[d.isTransitioning,S]),a.useEffect(function(){},[]);var P=a.useMemo(function(){return{createHref:r.createHref,encodeLocation:r.encodeLocation,go:function(e){return r.navigate(e)},push:function(e,t,n){return r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})},replace:function(e,t,n){return r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})}}},[r]),D=r.basename||"/",L=a.useMemo(function(){return{router:r,navigator:P,static:!1,basename:D}},[r,P,D]),_=a.useMemo(function(){return{v7_relativeSplatPath:r.future.v7_relativeSplatPath}},[r.future.v7_relativeSplatPath]);return a.useEffect(function(){return Dr(n,r.future)},[n,r.future]),a.createElement(a.Fragment,null,a.createElement(Ft.Provider,{value:L},a.createElement(It.Provider,{value:i},a.createElement(dn.Provider,{value:R.current},a.createElement(fn.Provider,{value:d},a.createElement(Or,{basename:D,location:i.location,navigationType:i.historyAction,navigator:P,future:_},i.initialized||r.future.v7_partialHydration?a.createElement(gn,{routes:r.routes,future:r.future,state:i}):t))))),null)}var gn=a.memo(wn);function wn(e){var t=e.routes,r=e.future;return nr(t,void 0,e.state,r)}function Sn(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=T({window:o,v5Compat:!0}));var u=i.current,s=Jr(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback(function(e){f&&hn?hn(function(){return l(e)}):l(e)},[l,f]);return a.useLayoutEffect(function(){return u.listen(d)},[u,d]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function En(e){var t=e.basename,r=e.children,n=e.future,o=e.window,i=a.useRef();null==i.current&&(i.current=j({window:o,v5Compat:!0}));var u=i.current,s=Jr(a.useState({action:u.action,location:u.location}),2),c=s[0],l=s[1],f=(n||{}).v7_startTransition,d=a.useCallback(function(e){f&&hn?hn(function(){return l(e)}):l(e)},[l,f]);return a.useLayoutEffect(function(){return u.listen(d)},[u,d]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:c.location,navigationType:c.action,navigator:u,future:n})}function Rn(e){var t=e.basename,r=e.children,n=e.future,o=e.history,i=Jr(a.useState({action:o.action,location:o.location}),2),u=i[0],s=i[1],c=(n||{}).v7_startTransition,l=a.useCallback(function(e){c&&hn?hn(function(){return s(e)}):s(e)},[s,c]);return a.useLayoutEffect(function(){return o.listen(l)},[o,l]),a.useEffect(function(){return Dr(n)},[n]),a.createElement(Or,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:o,future:n})}var xn,kn,Cn="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,Pn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dn=a.forwardRef(function(e,t){var r,n=e.onClick,o=e.relative,i=e.reloadDocument,u=e.replace,s=e.state,c=e.target,l=e.to,f=e.preventScrollReset,d=e.viewTransition,h=Yr(e,nn),v=a.useContext(Bt).basename,p=!1;if("string"==typeof l&&Pn.test(l)&&(r=l,Cn))try{var m=new URL(window.location.href),y=l.startsWith("//")?new URL(m.protocol+l):new URL(l),b=ie(y.pathname,v);y.origin===m.origin&&null!=b?l=b+y.search+y.hash:p=!0}catch(e){}var g=Kt(l,{relative:o}),w=On(l,{replace:u,state:s,target:c,preventScrollReset:f,relative:o,viewTransition:d});return a.createElement("a",qr({},h,{href:r||g,onClick:p||i?n:function(e){n&&n(e),e.defaultPrevented||w(e)},ref:t,target:c}))}),Ln=a.forwardRef(function(e,t){var r=e["aria-current"],n=void 0===r?"page":r,o=e.caseSensitive,i=void 0!==o&&o,u=e.className,s=void 0===u?"":u,c=e.end,l=void 0!==c&&c,f=e.style,d=e.to,h=e.viewTransition,v=e.children,p=Yr(e,an),m=tr(d,{relative:p.relative}),y=Vt(),b=a.useContext(It),g=a.useContext(Bt),w=g.navigator,S=g.basename,E=null!=b&&Jn(m)&&!0===h,R=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,x=y.pathname,k=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;i||(x=x.toLowerCase(),k=k?k.toLowerCase():null,R=R.toLowerCase()),k&&S&&(k=ie(k,S)||k);var C,P="/"!==R&&R.endsWith("/")?R.length-1:R.length,D=x===R||!l&&x.startsWith(R)&&"/"===x.charAt(P),L=null!=k&&(k===R||!l&&k.startsWith(R)&&"/"===k.charAt(R.length)),_={isActive:D,isPending:L,isTransitioning:E},A=D?n:void 0;C="function"==typeof s?s(_):[s,D?"active":null,L?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");var T="function"==typeof f?f(_):f;return a.createElement(Dn,qr({},p,{"aria-current":A,className:C,ref:t,style:T,to:d,viewTransition:h}),"function"==typeof v?v(_):v)}),_n=a.forwardRef(function(e,t){var r=e.fetcherKey,n=e.navigate,o=e.reloadDocument,i=e.replace,u=e.state,s=e.method,c=void 0===s?Xr:s,l=e.action,f=e.onSubmit,d=e.relative,h=e.preventScrollReset,v=e.viewTransition,p=Yr(e,on),m=In(),y=Nn(l,{relative:d}),b="get"===c.toLowerCase()?"get":"post";return a.createElement("form",qr({ref:t,method:b,action:y,onSubmit:o?f:function(e){if(f&&f(e),!e.defaultPrevented){e.preventDefault();var t=e.nativeEvent.submitter,a=(null==t?void 0:t.getAttribute("formmethod"))||c;m(t||e.currentTarget,{fetcherKey:r,method:a,navigate:n,replace:i,state:u,relative:d,preventScrollReset:h,viewTransition:v})}}},p))});function An(e){return Kn({getKey:e.getKey,storageKey:e.storageKey}),null}function Tn(e){var t=a.useContext(Ft);return t||O(!1),t}function jn(e){var t=a.useContext(It);return t||O(!1),t}function On(e,t){var r=void 0===t?{}:t,n=r.target,o=r.replace,i=r.state,u=r.preventScrollReset,s=r.relative,c=r.viewTransition,l=Xt(),f=Vt(),d=tr(e,{relative:s});return a.useCallback(function(t){if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();var r=void 0!==o?o:I(f)===I(d);l(e,{replace:r,state:i,preventScrollReset:u,relative:s,viewTransition:c})}},[f,l,d,o,i,n,e,u,s,c])}function Mn(e){var t=a.useRef(Zr(e)),r=a.useRef(!1),n=Vt(),o=a.useMemo(function(){return function(e,t){var r=Zr(e);return t&&t.forEach(function(e,n){r.has(n)||t.getAll(n).forEach(function(e){r.append(n,e)})}),r}(n.search,r.current?null:t.current)},[n.search]),i=Xt(),u=a.useCallback(function(e,t){var n=Zr("function"==typeof e?e(o):e);r.current=!0,i("?"+n,t)},[i,o]);return[o,u]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(xn||(xn={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(kn||(kn={}));var Un=0,Fn=function(){return"__"+String(++Un)+"__"};function In(){var e=Tn(xn.UseSubmit).router,t=a.useContext(Bt).basename,r=vr();return a.useCallback(function(n,a){void 0===a&&(a={}),function(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();var o=function(e,t){var r,n,a,o,i,u;if(Qr(u=e)&&"form"===u.tagName.toLowerCase()){var s=e.getAttribute("action");n=s?ie(s,t):null,r=e.getAttribute("method")||Xr,a=rn(e.getAttribute("enctype"))||Gr,o=new FormData(e)}else if(function(e){return Qr(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return Qr(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){var c=e.form;if(null==c)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');var l=e.getAttribute("formaction")||c.getAttribute("action");if(n=l?ie(l,t):null,r=e.getAttribute("formmethod")||c.getAttribute("method")||Xr,a=rn(e.getAttribute("formenctype"))||rn(c.getAttribute("enctype"))||Gr,o=new FormData(c,e),!function(){if(null===en)try{new FormData(document.createElement("form"),0),en=!1}catch(e){en=!0}return en}()){var f=e.name,d=e.type,h=e.value;if("image"===d){var v=f?f+".":"";o.append(v+"x","0"),o.append(v+"y","0")}else f&&o.append(f,h)}}else{if(Qr(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Xr,n=null,a=Gr,i=e}return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}(n,t),i=o.action,u=o.method,s=o.encType,c=o.formData,l=o.body;if(!1===a.navigate){var f=a.fetcherKey||Fn();e.fetch(f,r,a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,flushSync:a.flushSync})}else e.navigate(a.action||i,{preventScrollReset:a.preventScrollReset,formData:c,body:l,formMethod:a.method||u,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:r,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,r])}function Nn(e,t){var r=(void 0===t?{}:t).relative,n=a.useContext(Bt).basename,o=a.useContext(Ht);o||O(!1);var i=Jr(o.matches.slice(-1),1)[0],u=qr({},tr(e||".",{relative:r})),s=Vt();if(null==e){u.search=s.search;var c=new URLSearchParams(u.search),l=c.getAll("index");if(l.some(function(e){return""===e})){c.delete("index"),l.filter(function(e){return e}).forEach(function(e){return c.append("index",e)});var f=c.toString();u.search=f?"?"+f:""}}return e&&"."!==e||!i.route.index||(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(u.pathname="/"===u.pathname?n:de([n,u.pathname])),I(u)}function Bn(e){var t,r=(void 0===e?{}:e).key,n=Tn(xn.UseFetcher).router,o=jn(kn.UseFetcher),i=a.useContext(dn),u=a.useContext(Ht),s=null==(t=u.matches[u.matches.length-1])?void 0:t.route.id;i||O(!1),u||O(!1),null==s&&O(!1);var c=pn?pn():"",l=Jr(a.useState(r||c),2),f=l[0],d=l[1];r&&r!==f?d(r):f||d(Fn()),a.useEffect(function(){return n.getFetcher(f),function(){n.deleteFetcher(f)}},[n,f]);var h=a.useCallback(function(e,t){s||O(!1),n.fetch(f,s,e,t)},[f,s,n]),v=In(),p=a.useCallback(function(e,t){v(e,qr({},t,{navigate:!1,fetcherKey:f}))},[f,v]),m=a.useMemo(function(){return a.forwardRef(function(e,t){return a.createElement(_n,qr({},e,{navigate:!1,fetcherKey:f,ref:t}))})},[f]),y=o.fetchers.get(f)||Te,b=i.get(f);return a.useMemo(function(){return qr({Form:m,submit:p,load:h},y,{data:b})},[m,p,h,y,b])}function zn(){var e=jn(kn.UseFetchers);return Array.from(e.fetchers.entries()).map(function(e){var t=Jr(e,2),r=t[0];return qr({},t[1],{key:r})})}var Hn="react-router-scroll-positions",Wn={};function Kn(e){var t,r,n=void 0===e?{}:e,o=n.getKey,i=n.storageKey,u=Tn(xn.UseScrollRestoration).router,s=jn(kn.UseScrollRestoration),c=s.restoreScrollPosition,l=s.preventScrollReset,f=a.useContext(Bt).basename,d=Vt(),h=yr(),v=pr();a.useEffect(function(){return window.history.scrollRestoration="manual",function(){window.history.scrollRestoration="auto"}},[]),t=a.useCallback(function(){if("idle"===v.state){var e=(o?o(d,h):null)||d.key;Wn[e]=window.scrollY}try{sessionStorage.setItem(i||Hn,JSON.stringify(Wn))}catch(e){}window.history.scrollRestoration="auto"},[i,o,v.state,d,h]),r={}.capture,a.useEffect(function(){var e=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",t,e),function(){window.removeEventListener("pagehide",t,e)}},[t,r]),"undefined"!=typeof document&&(a.useLayoutEffect(function(){try{var e=sessionStorage.getItem(i||Hn);e&&(Wn=JSON.parse(e))}catch(e){}},[i]),a.useLayoutEffect(function(){var e=o&&"/"!==f?function(e,t){return o(qr({},e,{pathname:ie(e.pathname,f)||e.pathname}),t)}:o,t=null==u?void 0:u.enableScrollRestoration(Wn,function(){return window.scrollY},e);return function(){return t&&t()}},[u,f,o]),a.useLayoutEffect(function(){if(!1!==c)if("number"!=typeof c){if(d.hash){var e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==l&&window.scrollTo(0,0)}else window.scrollTo(0,c)},[d,c,l]))}function $n(e,t){var r=(t||{}).capture;a.useEffect(function(){var t=null!=r?{capture:r}:void 0;return window.addEventListener("beforeunload",e,t),function(){window.removeEventListener("beforeunload",e,t)}},[e,r])}function Vn(e){var t=e.when,r=e.message,n=kr(t);a.useEffect(function(){"blocked"===n.state&&(window.confirm(r)?setTimeout(n.proceed,0):n.reset())},[n,r]),a.useEffect(function(){"blocked"!==n.state||t||n.reset()},[n,t])}function Jn(e,t){void 0===t&&(t={});var r=a.useContext(fn);null==r&&O(!1);var n=Tn(xn.useViewTransitionState).basename,o=tr(e,{relative:t.relative});if(!r.isTransitioning)return!1;var i=ie(r.currentLocation.pathname,n)||r.currentLocation.pathname,u=ie(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=ae(o.pathname,u)||null!=ae(o.pathname,i)}}}]);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @remix-run/router v1.23.0
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) Remix Software Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
8
|
+
*
|
|
9
|
+
* @license MIT
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* React Router DOM v6.30.1
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) Remix Software Inc.
|
|
16
|
+
*
|
|
17
|
+
* This source code is licensed under the MIT license found in the
|
|
18
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
19
|
+
*
|
|
20
|
+
* @license MIT
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* React Router v6.30.1
|
|
25
|
+
*
|
|
26
|
+
* Copyright (c) Remix Software Inc.
|
|
27
|
+
*
|
|
28
|
+
* This source code is licensed under the MIT license found in the
|
|
29
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
30
|
+
*
|
|
31
|
+
* @license MIT
|
|
32
|
+
*/
|