Socket
Socket
Sign inDemoInstall

@tanstack/react-router

Package Overview
Dependencies
Maintainers
1
Versions
583
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tanstack/react-router - npm Package Compare versions

Comparing version 0.0.1-alpha.8 to 0.0.1-alpha.9

54

build/stats-react.json

@@ -10,3 +10,3 @@ {

{
"uid": "065c-67",
"uid": "72d9-67",
"name": "\u0000rollupPluginBabelHelpers.js"

@@ -19,7 +19,7 @@ },

"name": "router-core/build/esm/index.js",
"uid": "065c-69"
"uid": "72d9-69"
},
{
"name": "react-router/src/index.tsx",
"uid": "065c-71"
"uid": "72d9-71"
}

@@ -34,26 +34,26 @@ ]

"nodeParts": {
"065c-67": {
"72d9-67": {
"renderedLength": 798,
"gzipLength": 366,
"brotliLength": 0,
"mainUid": "065c-66"
"mainUid": "72d9-66"
},
"065c-69": {
"renderedLength": 73033,
"gzipLength": 15403,
"72d9-69": {
"renderedLength": 74043,
"gzipLength": 15503,
"brotliLength": 0,
"mainUid": "065c-68"
"mainUid": "72d9-68"
},
"065c-71": {
"72d9-71": {
"renderedLength": 11495,
"gzipLength": 2999,
"brotliLength": 0,
"mainUid": "065c-70"
"mainUid": "72d9-70"
}
},
"nodeMetas": {
"065c-66": {
"72d9-66": {
"id": "\u0000rollupPluginBabelHelpers.js",
"moduleParts": {
"index.production.js": "065c-67"
"index.production.js": "72d9-67"
},

@@ -63,10 +63,10 @@ "imported": [],

{
"uid": "065c-70"
"uid": "72d9-70"
}
]
},
"065c-68": {
"72d9-68": {
"id": "/packages/router-core/build/esm/index.js",
"moduleParts": {
"index.production.js": "065c-69"
"index.production.js": "72d9-69"
},

@@ -76,23 +76,23 @@ "imported": [],

{
"uid": "065c-70"
"uid": "72d9-70"
}
]
},
"065c-70": {
"72d9-70": {
"id": "/packages/react-router/src/index.tsx",
"moduleParts": {
"index.production.js": "065c-71"
"index.production.js": "72d9-71"
},
"imported": [
{
"uid": "065c-66"
"uid": "72d9-66"
},
{
"uid": "065c-72"
"uid": "72d9-72"
},
{
"uid": "065c-73"
"uid": "72d9-73"
},
{
"uid": "065c-68"
"uid": "72d9-68"
}

@@ -103,3 +103,3 @@ ],

},
"065c-72": {
"72d9-72": {
"id": "react",

@@ -110,3 +110,3 @@ "moduleParts": {},

{
"uid": "065c-70"
"uid": "72d9-70"
}

@@ -116,3 +116,3 @@ ],

},
"065c-73": {
"72d9-73": {
"id": "use-sync-external-store/shim",

@@ -123,3 +123,3 @@ "moduleParts": {},

{
"uid": "065c-70"
"uid": "72d9-70"
}

@@ -126,0 +126,0 @@ ],

@@ -11,3 +11,3 @@ /**

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("use-sync-external-store/shim")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactLocation={},e.React,e.shim)}(this,(function(e,t,n){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var r,o=a(t);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,a,r={},o=Object.keys(e);for(a=0;a<o.length;a++)n=o[a],t.indexOf(n)>=0||(r[n]=e[n]);return r}
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("use-sync-external-store/shim")):"function"==typeof define&&define.amd?define(["exports","react","use-sync-external-store/shim"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactLocation={},e.React,e.shim)}(this,(function(e,t,n){"use strict";function a(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var o,r=a(t);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},i.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(o[n]=e[n]);return o}
/**

@@ -22,3 +22,3 @@ * router-core

* @license MIT
*/function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(r||(r={}));var c="beforeunload",u="popstate";function h(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=n.location,t=e.pathname,r=e.search,o=e.hash,i=a.state||{};return[i.idx,{pathname:t,search:r,hash:o,state:i.usr||null,key:i.key||"default"}]}var i=null;n.addEventListener(u,(function(){if(i)P.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(P.length){if(null!=n){var s=d-n;s&&(i={action:e,location:a,retry:function(){L(-1*s)}},L(s))}}else S(e)}}));var s=r.Pop,h=o(),d=h[0],f=h[1],_=m(),P=m();function b(e){return"string"==typeof e?e:g(e)}function w(e,t){return void 0===t&&(t=null),l({pathname:f.pathname,hash:"",search:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function E(e,t){return[{usr:e.state,key:e.key,idx:t},b(e)]}function R(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function S(e){s=e;var t=o();d=t[0],f=t[1],_.call({action:s,location:f})}function L(e){a.go(e)}null==d&&(d=0,a.replaceState(l({},a.state,{idx:d}),""));var x={get action(){return s},get location(){return f},createHref:b,push:function e(t,o){var i=r.Push,s=w(t,o);if(R(i,s,(function(){e(t,o)}))){var l=E(s,d+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}S(i)}},replace:function e(t,n){var o=r.Replace,i=w(t,n);if(R(o,i,(function(){e(t,n)}))){var s=E(i,d),l=s[0],c=s[1];a.replaceState(l,"",c),S(o)}},go:L,back:function(){L(-1)},forward:function(){L(1)},listen:function(e){return _.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(c,p),function(){t(),P.length||n.removeEventListener(c,p)}}};return x}function d(e){void 0===e&&(e={});var t=e,n=t.initialEntries,a=void 0===n?["/"]:n,o=t.initialIndex,i=a.map((function(e){return l({pathname:"/",search:"",hash:"",state:null,key:v()},"string"==typeof e?y(e):e)})),s=f(null==o?i.length-1:o,0,i.length-1),c=r.Pop,u=i[s],h=m(),d=m();function p(e,t){return void 0===t&&(t=null),l({pathname:u.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function _(e,t,n){return!d.length||(d.call({action:e,location:t,retry:n}),!1)}function P(e,t){c=e,u=t,h.call({action:c,location:u})}function b(e){var t=f(s+e,0,i.length-1),n=r.Pop,a=i[t];_(n,a,(function(){b(e)}))&&(s=t,P(n,a))}var w={get index(){return s},get action(){return c},get location(){return u},createHref:function(e){return"string"==typeof e?e:g(e)},push:function e(t,n){var a=r.Push,o=p(t,n);_(a,o,(function(){e(t,n)}))&&(s+=1,i.splice(s,i.length,o),P(a,o))},replace:function e(t,n){var a=r.Replace,o=p(t,n);_(a,o,(function(){e(t,n)}))&&(i[s]=o,P(a,o))},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return h.push(e)},block:function(e){return d.push(e)}};return w}function f(e,t,n){return Math.min(Math.max(e,t),n)}function p(e){e.preventDefault(),e.returnValue=""}function m(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function v(){return Math.random().toString(36).substr(2,8)}function g(e){var t=e.pathname,n=void 0===t?"/":t,a=e.search,r=void 0===a?"":a,o=e.hash,i=void 0===o?"":o;return r&&"?"!==r&&(n+="?"===r.charAt(0)?r:"?"+r),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function y(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function _(e,t){if(!e)throw new Error("Invariant failed")}function P(e,t){if(e===t)return e;const n=Array.isArray(e)&&Array.isArray(t);if(n||b(e)&&b(t)){const a=n?e.length:Object.keys(e).length,r=n?t:Object.keys(t),o=r.length,i=n?[]:{};let s=0;for(let a=0;a<o;a++){const o=n?a:r[a];i[o]=P(e[o],t[o]),i[o]===e[o]&&s++}return a===o&&s===a?e:i}return t}function b(e){if(!w(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){return e[e.length-1]}function R(e,t){if(e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}return!0}function S(e,t){return"function"==typeof e?e(t):e}function L(e){return x(e.filter(Boolean).join("/"))}function x(e){return e.replace(/\/{2,}/g,"/")}function I(e){return"/"===e?e:e.replace(/^\/{1,}/,"")}function M(e){return"/"===e?e:e.replace(/\/{1,}$/,"")}function A(e){return M(I(e))}function k(e,t,n){t=t.replace(new RegExp("^"+e),"/"),n=n.replace(new RegExp("^"+e),"/");let a=C(t);const r=C(n);r.forEach(((e,t)=>{if("/"===e.value)t?t===r.length-1&&a.push(e):a=[e];else if(".."===e.value){var n;a.length>1&&"/"===(null==(n=E(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===e.value)return;a.push(e)}}));return x(L([e,...a.map((e=>e.value))]))}function C(e){if(!e)return[];const t=[];if("/"===(e=x(e)).slice(0,1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map((e=>e.startsWith("*")?{type:"wildcard",value:e}:":"===e.charAt(0)?{type:"param",value:e}:{type:"pathname",value:e}))),"/"===e.slice(-1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function O(e,t,n){return L(C(e).map((e=>{return"*"!==e.value||n?"param"===e.type?null!=(a=t[e.value.substring(1)])?a:"":e.value:"";var a})))}function j(e,t){const n=T(e,t);if(!t.to||n)return null!=n?n:{}}function T(e,t){var n;const a=C(e),r=C(""+(null!=(n=t.to)?n:"*")),o={};return(()=>{for(let e=0;e<Math.max(a.length,r.length);e++){const n=a[e],i=r[e],s=e===r.length-1,l=e===a.length-1;if(i){if("wildcard"===i.type)return!(null==n||!n.value)&&(o["*"]=L(a.slice(e).map((e=>e.value))),!0);if("pathname"===i.type){if("/"===i.value&&(null==n||!n.value))return!0;if(n)if(t.caseSensitive){if(i.value!==n.value)return!1}else if(i.value.toLowerCase()!==n.value.toLowerCase())return!1}if(!n)return!1;if("param"===i.type){if("/"===(null==n?void 0:n.value))return!1;n.value.startsWith(":")||(o[i.value.substring(1)]=n.value)}}if(s&&!l)return!!t.fuzzy}return!0})()?o:void 0}function D(e,t){var n,a,r,o="";for(n in e)if(void 0!==(r=e[n]))if(Array.isArray(r))for(a=0;a<r.length;a++)o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r[a]);else o&&(o+="&"),o+=encodeURIComponent(n)+"="+encodeURIComponent(r);return(t||"")+o}function F(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}function N(e){for(var t,n,a={},r=e.split("&");t=r.shift();)void 0!==a[n=(t=t.split("=")).shift()]?a[n]=[].concat(a[n],F(t.shift())):a[n]=F(t.shift());return a}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},B.apply(this,arguments)}function H(e,t,n,a){const{id:r,routeId:o,path:i,fullPath:s}=e,l=a.state.actions[r]||(a.state.actions[r]={pending:[],submit:async(e,t)=>{var n;if(!c)return;const r=null==(n=null==t?void 0:t.invalidate)||n,o={submittedAt:Date.now(),status:"pending",submission:e};l.current=o,l.latest=o,l.pending.push(o),a.state=B({},a.state,{currentAction:o,latestAction:o}),a.notify();try{const t=await(null==c.options.action?void 0:c.options.action(e));return o.data=t,r&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),o.status="success",t}catch(e){console.error(e),o.error=e,o.status="error"}finally{l.pending=l.pending.filter((e=>e!==o)),a.removeActionQueue.push({action:l,actionState:o}),a.notify()}}},a.state.actions[r]);let c={routeId:r,routeRouteId:o,routePath:i,fullPath:s,options:t,router:a,childRoutes:void 0,parentRoute:n,action:l,buildLink:e=>a.buildLink(B({},e,{from:s})),navigate:e=>a.navigate(B({},e,{from:s})),matchRoute:(e,t)=>a.matchRoute(B({},e,{from:s}),t)};return null==a.options.createRoute||a.options.createRoute({router:a,route:c}),c}function U(e){e.forEach(((t,n)=>{const a=e[n-1];a&&(t.loaderData=P(t.loaderData,B({},a.loaderData,t.routeLoaderData)))}))}const z="__root__",G=["element","errorElement","catchElement","pendingElement"];function W(e,t,n){const a=B({},t,n,{router:e,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isPending:!1,isFetching:!1,isInvalid:!1,getIsInvalid:()=>{var t,n;const r=Date.now(),o=null!=(t=null!=(n=a.options.loaderMaxAge)?n:e.options.defaultLoaderMaxAge)?t:0;return a.isInvalid||a.updatedAt+o<r},__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},startPending:()=>{var t,n;const r=null!=(t=a.options.pendingMs)?t:e.options.defaultPendingMs,o=null!=(n=a.options.pendingMinMs)?n:e.options.defaultPendingMinMs;a.__.pendingTimeout||"loading"!==a.status||void 0===r||(a.__.pendingTimeout=setTimeout((()=>{a.isPending=!0,a.__.resolve(),void 0!==o&&(a.__.pendingMinPromise=new Promise((e=>a.__.pendingMinTimeout=setTimeout(e,o))))}),r))},cancelPending:()=>{a.isPending=!1,clearTimeout(a.__.pendingTimeout),clearTimeout(a.__.pendingMinTimeout),delete a.__.pendingMinPromise},validate:()=>{var t,n;const r=null!=(t=null==(n=a.parentMatch)?void 0:n.search)?t:e.location.search;try{const e=a.routeSearch,t="object"==typeof a.options.validateSearch?a.options.validateSearch.parse:a.options.validateSearch;let n=P(e,null==t?void 0:t(r));e!==n&&(a.isInvalid=!0),a.routeSearch=n,a.search=P(r,B({},r,n))}catch(e){console.error(e);const t=new Error("Invalid search params found",{cause:e});return t.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=t)}}},cancel:()=>{var e;null==(e=a.__.abortController)||e.abort(),a.__.cancelPending()},invalidate:()=>{a.isInvalid=!0},hasLoaders:()=>!!(t.options.loader||t.options.import||G.some((e=>"function"==typeof t.options[e]))),load:async()=>{const e=""+Date.now()+Math.random();return a.__.latestId=e,"idle"===a.status&&(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async t=>{a.isFetching=!0,a.__.resolve=t;const n=(async()=>{const t=a.options.import;t&&(a.__.importPromise=t({params:a.params}).then((e=>{a.__=B({},a.__,e)}))),await a.__.importPromise,a.__.elementsPromise=(async()=>{await Promise.all(G.map((async e=>{const t=a.options[e];if(!a.__[e])if("function"==typeof t){const n=await t(a);a.__[e]=n}else a.__[e]=a.options[e]})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{if(a.options.loader){const t=await a.options.loader({params:a.params,search:a.routeSearch,signal:a.__.abortController.signal});if(e!==a.__.latestId)return a.__.loaderPromise;a.routeLoaderData=P(a.routeLoaderData,t)}a.error=void 0,a.status="success",a.updatedAt=Date.now()}catch(t){if(e!==a.__.latestId)return a.__.loaderPromise;a.error=t,a.status="error",a.updatedAt=Date.now()}}));try{if(await Promise.all([a.__.elementsPromise,a.__.dataPromise]),e!==a.__.latestId)return a.__.loaderPromise;a.__.pendingMinPromise&&(await a.__.pendingMinPromise,delete a.__.pendingMinPromise)}finally{if(e!==a.__.latestId)return a.__.loaderPromise;a.__.cancelPending(),a.isPending=!1,a.isFetching=!1,a.__.notify()}})();if(a.__.loaderPromise=n,await n,e!==a.__.latestId)return a.__.loaderPromise;delete a.__.loaderPromise})),await a.__.loadPromise}});return a.hasLoaders()||(a.status="success"),a}const q=Q(JSON.parse),K=V(JSON.stringify);function Q(e){return t=>{"?"===t.substring(0,1)&&(t=t.substring(1));let n=N(t);for(let t in n){const a=n[t];if("string"==typeof a)try{n[t]=e(a)}catch(e){}}return n}}function V(e){return t=>{(t=B({},t))&&Object.keys(t).forEach((n=>{const a=t[n];if(void 0===a||void 0===a)delete t[n];else if(a&&"object"==typeof a&&null!==a)try{t[n]=e(a)}catch(e){}}));const n=D(t).toString();return n?"?"+n:""}}var J;const X=Boolean("undefined"==typeof window||!(null!=(J=window.document)&&J.createElement));function Y(e){var t,n;const a=(null==e?void 0:e.history)||(X?d():h());let r={options:B({defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultLinkPreloadDelay:50},e,{stringifySearch:null!=(t=null==e?void 0:e.stringifySearch)?t:K,parseSearch:null!=(n=null==e?void 0:e.parseSearch)?n:q}),listeners:[],removeActionQueue:[],basepath:"",routeTree:void 0,routesById:{},location:void 0,allRouteInfo:void 0,navigationPromise:Promise.resolve(),resolveNavigation:()=>{},matchCache:{},state:{status:"idle",location:null,matches:[],actions:{},loaderData:{},lastUpdated:Date.now(),isFetching:!1,isPreloading:!1},startedLoadingAt:Date.now(),subscribe:e=>(r.listeners.push(e),()=>{r.listeners=r.listeners.filter((t=>t!==e))}),getRoute:e=>r.routesById[e],notify:()=>{r.state=B({},r.state,{isFetching:"loading"===r.state.status||r.state.matches.some((e=>e.isFetching)),isPreloading:Object.values(r.matchCache).some((e=>e.match.isFetching&&!r.state.matches.find((t=>t.matchId===e.match.matchId))))}),U(r.state.matches),r.listeners.forEach((e=>e()))},mount:()=>{const e=r.buildLocation({to:".",search:!0,hash:!0});e.href!==r.location.href?r.commitLocation(e,!0):r.loadLocation();const t=a.listen((e=>{r.loadLocation(r.parseLocation(e.location,r.location))}));return!X&&window.addEventListener&&(window.addEventListener("visibilitychange",r.onFocus,!1),window.addEventListener("focus",r.onFocus,!1)),()=>{t(),window.removeEventListener("visibilitychange",r.onFocus),window.removeEventListener("focus",r.onFocus)}},onFocus:()=>{r.loadLocation()},update:e=>{Object.assign(r.options,e);const{basepath:t,routeConfig:n}=r.options;return r.basepath=x("/"+(null!=t?t:"")),n&&(r.routesById={},r.routeTree=r.buildRouteTree(n)),r},buildRouteTree:e=>{const t=(e,n)=>e.map((e=>{const a=H(e,e.options,n,r);if(r.routesById[a.routeId])throw new Error;r.routesById[a.routeId]=a;const o=e.children;return a.childRoutes=null!=o&&o.length?t(o,a):void 0,a}));return t([e])[0]},parseLocation:(e,t)=>{var n;const a=r.options.parseSearch(e.search);return{pathname:e.pathname,searchStr:e.search,search:P(null==t?void 0:t.search,a),hash:null!=(n=e.hash.split("#").reverse()[0])?n:"",href:""+e.pathname+e.search+e.hash,state:e.state,key:e.key}},buildLocation:function(e){var t,n,a,o,i,s,l,c,u;void 0===e&&(e={});const h=e.fromCurrent?r.location.pathname:null!=(t=e.from)?t:r.location.pathname;let d=k(null!=(n=r.basepath)?n:"/",h,""+(null!=(a=e.to)?a:"."));const f=r.matchRoutes(r.location.pathname,{strictParseParams:!0}),p=r.matchRoutes(d),m=B({},null==(o=E(f))?void 0:o.params);let v=!0===(null==(i=e.params)||i)?m:S(e.params,m);v&&p.map((e=>e.options.stringifyParams)).filter(Boolean).forEach((e=>{Object.assign({},v,e(v))})),d=O(d,null!=v?v:{});const g=null!=(s=e.__preSearchFilters)&&s.length?e.__preSearchFilters.reduce(((e,t)=>t(e)),r.location.search):r.location.search,y=!0===e.search?g:e.search?null!=(l=S(e.search,g))?l:{}:null!=(c=e.__preSearchFilters)&&c.length?g:{},_=null!=(u=e.__postSearchFilters)&&u.length?e.__postSearchFilters.reduce(((e,t)=>t(e)),y):y,b=P(r.location.search,_),w=r.options.stringifySearch(b);let R=!0===e.hash?r.location.hash:S(e.hash,r.location.hash);return R=R?"#"+R:"",{pathname:d,search:b,searchStr:w,state:r.location.state,hash:R,href:""+d+w+R,key:e.key}},commitLocation:(e,t)=>{const n=""+Date.now()+Math.random();r.navigateTimeout&&clearTimeout(r.navigateTimeout);let o="replace";t||(o="push");return r.parseLocation(a.location).href===e.href&&!e.key&&(o="replace"),"replace"===o?a.replace({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}):a.push({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}),r.navigationPromise=new Promise((e=>{const t=r.resolveNavigation;r.resolveNavigation=()=>{t(),e()}})),r.navigationPromise},buildNext:e=>{const t=r.buildLocation(e),n=r.matchRoutes(t.pathname),a=n.map((e=>{var t;return null!=(t=e.options.preSearchFilters)?t:[]})).flat().filter(Boolean),o=n.map((e=>{var t;return null!=(t=e.options.postSearchFilters)?t:[]})).flat().filter(Boolean);return r.buildLocation(B({},e,{__preSearchFilters:a,__postSearchFilters:o}))},cancelMatches:()=>{var e,t;[...r.state.matches,...null!=(e=null==(t=r.state.pending)?void 0:t.matches)?e:[]].forEach((e=>{e.cancel()}))},loadLocation:async e=>{const t=Math.random();r.startedLoadingAt=t,e&&(r.location=e),r.removeActionQueue.forEach((e=>{let{action:t,actionState:n}=e;r.state.currentAction===n&&(r.state.currentAction=void 0),t.current===n&&(t.current=void 0)})),r.removeActionQueue=[],r.cancelMatches();const n=r.matchRoutes(location.pathname,{strictParseParams:!0});if(r.state=B({},r.state,{pending:{matches:n,location:r.location},status:"loading"}),r.notify(),await r.loadMatches(n,{withPending:!0}),r.startedLoadingAt!==t)return r.navigationPromise;const a=r.state.matches,o=[],i=[];a.forEach((e=>{n.find((t=>t.matchId===e.matchId))?i.push(e):o.push(e)}));const s=Date.now();o.forEach((e=>{var t,n,a,o;null==e.__.onExit||e.__.onExit({params:e.params,search:e.routeSearch}),"error"!==e.status||e.isFetching||(e.status="idle",e.error=void 0);const i=Math.max(null!=(t=null!=(n=e.options.loaderGcMaxAge)?n:r.options.defaultLoaderGcMaxAge)?t:0,null!=(a=null!=(o=e.options.loaderMaxAge)?o:r.options.defaultLoaderMaxAge)?a:0);i>0&&(r.matchCache[e.matchId]={gc:i==1/0?Number.MAX_SAFE_INTEGER:s+i,match:e})})),i.forEach((e=>{null==e.options.onTransition||e.options.onTransition({params:e.params,search:e.routeSearch})}));n.filter((e=>!a.find((t=>t.matchId===e.matchId)))).forEach((e=>{e.__.onExit=null==e.options.onMatch?void 0:e.options.onMatch({params:e.params,search:e.search})})),n.some((e=>"loading"===e.status))&&(r.notify(),await Promise.all(n.map((e=>e.__.loaderPromise||Promise.resolve())))),r.startedLoadingAt===t&&(r.state=B({},r.state,{location:r.location,matches:n,pending:void 0,status:"idle"}),r.notify(),r.resolveNavigation())},cleanMatchCache:()=>{const e=Date.now();Object.keys(r.matchCache).forEach((t=>{const n=r.matchCache[t];"loading"!==n.match.status&&(n.gc>0&&n.gc>e||delete r.matchCache[t])}))},loadRoute:async function(e,t){void 0===e&&(e=r.location);const n=r.buildNext(e),a=r.matchRoutes(n.pathname,{strictParseParams:!0});return await r.loadMatches(a,{preload:!0,maxAge:t.maxAge}),a},matchRoutes:(e,t)=>{var n,a;r.cleanMatchCache();const o=[];if(!r.routeTree)return o;const i=[...r.state.matches,...null!=(n=null==(a=r.state.pending)?void 0:a.matches)?n:[]],s=async n=>{var a,l,c;const u=E(o);let h=null!=(a=null==u?void 0:u.params)?a:{};const d=null!=(l=null==r.options.filterRoutes?void 0:r.options.filterRoutes(n))?l:n;let f=[];const p=(n,a)=>(a.some((a=>{var o,i,s;if(!a.routePath&&null!=(o=a.childRoutes)&&o.length)return p([...f,a],a.childRoutes);const l=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),c=j(e,{to:a.fullPath,fuzzy:l,caseSensitive:null!=(s=a.options.caseSensitive)?s:r.options.caseSensitive});if(c){let e;try{var u;e=null!=(u=null==a.options.parseParams?void 0:a.options.parseParams(c))?u:c}catch(e){if(null!=t&&t.strictParseParams)throw e}h=B({},h,e)}return c&&(f=[...n,a]),!!f.length})),!!f.length);if(p([],d),!f.length)return;f.forEach((t=>{var n;const a=O(t.routePath,h),s=O(t.routeId,h,!0),l=i.find((e=>e.matchId===s))||(null==(n=r.matchCache[s])?void 0:n.match)||W(r,t,{matchId:s,params:h,pathname:L([e,a])});o.push(l)}));const m=E(f);null!=(c=m.childRoutes)&&c.length&&s(m.childRoutes)};return s([r.routeTree]),U(o),o},loadMatches:async(e,t)=>{const n=Date.now(),a=e.map((async e=>{if(e.__.validate(),null!=t&&t.preload&&(null==t?void 0:t.maxAge)>0){if(r.state.matches.find((t=>t.matchId===e.matchId)))return;r.matchCache[e.matchId]={gc:n+t.maxAge,match:e}}("success"===e.status&&e.getIsInvalid()||"error"===e.status||"idle"===e.status)&&e.load(),"loading"===e.status&&(null!=t&&t.withPending&&e.__.startPending(),await e.__.loadPromise)}));r.notify(),await Promise.all(a)},invalidateRoute:e=>{var t,n;const a=r.buildNext(e),o=r.matchRoutes(a.pathname).map((e=>e.matchId));[...r.state.matches,...null!=(t=null==(n=r.state.pending)?void 0:n.matches)?t:[]].forEach((e=>{o.includes(e.matchId)&&e.invalidate()}))},reload:()=>r._navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(e,t)=>k(r.basepath,e,x(t)),matchRoute:(e,t)=>{var n;e=B({},e,{to:e.to?r.resolvePath(null!=(n=e.from)?n:"",e.to):void 0});const a=r.buildNext(e);var o;return null!=t&&t.pending?!(null==(o=r.state.pending)||!o.location)&&!!j(r.state.pending.location.pathname,B({},t,{to:a.pathname})):!!j(r.state.location.pathname,B({},t,{to:a.pathname}))},_navigate:e=>{const t=r.buildNext(e);return r.commitLocation(t,e.replace)},navigate:async e=>{let{from:t,to:n=".",search:a,hash:o,replace:i,params:s}=e;const l=String(n),c=String(t);let u;try{new URL(""+l),u=!0}catch(e){}return _(!u),r._navigate({from:c,to:l,search:a,hash:o,replace:i,params:s})},buildLink:e=>{var t,n,a,o;let{from:i,to:s=".",search:l,params:c,hash:u,target:h,replace:d,activeOptions:f,preload:p,preloadMaxAge:m,preloadDelay:v,disabled:g}=e;try{return new URL(""+s),{type:"external",href:s}}catch(e){}const y={from:i,to:s,search:l,params:c,hash:u,replace:d},_=r.buildNext(y);p=null!=(t=p)?t:r.options.defaultLinkPreload;const P=null!=(n=null!=(a=null!=m?m:r.options.defaultLinkPreloadMaxAge)?a:r.options.defaultLoaderGcMaxAge)?n:0,b=null!=(o=null!=v?v:r.options.defaultLinkPreloadDelay)?o:0,w=r.state.location.pathname===_.pathname,E=r.state.location.pathname.split("/"),R=_.pathname.split("/").every(((e,t)=>e===E[t])),S=r.state.location.hash===_.hash,L=null!=f&&f.exact?w:R,x=null==f||!f.includeHash||S;return{type:"internal",next:_,handleFocus:e=>{p&&P>0&&r.loadRoute(y,{maxAge:P})},handleClick:e=>{g||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||e.defaultPrevented||h&&"_self"!==h||0!==e.button||(e.preventDefault(),!w||l||u||r.invalidateRoute(y),r._navigate(y))},handleEnter:e=>{const t=e.target||{};if(p&&P>0){if(t.preloadTimeout)return;t.preloadTimeout=setTimeout((()=>{t.preloadTimeout=null,r.loadRoute(y,{maxAge:P})}),b)}},handleLeave:e=>{const t=e.target||{};t.preloadTimeout&&(clearTimeout(t.preloadTimeout),t.preloadTimeout=null)},isActive:L&&x,disabled:g}}};return r.location=r.parseLocation(a.location),r.state.location=r.location,r.update(e),null==r.options.createRouter||r.options.createRouter(r),r}const $=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],Z=["pending","caseSensitive","children"],ee=["children","router"],te=o.createContext(null),ne=o.createContext(null),ae=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)?o.useLayoutEffect:o.useEffect;function re(e){return o.createElement(te.Provider,e)}const oe=e=>{n.useSyncExternalStore((t=>e.subscribe((()=>t()))),(()=>e.state))};function ie(){return o.useContext(te)}function se(){var e;const t=function(){const e=o.useContext(ne);return R(!e,"useRouter must be used inside a <Router> component!"),oe(e.router),e.router}(),[,...n]=ie(),a=n[0];if(!a)return null;const r=(()=>{var e,n;if(!a)return null;const r=null!=(e=a.__.errorElement)?e:t.options.defaultErrorElement;if("error"===a.status){if(r)return r;if(a.options.useErrorBoundary||t.options.useErrorBoundary)throw a.error;return o.createElement(ce,{error:a.error})}if("loading"===a.status||"idle"===a.status){if(a.isPending){var i;const e=null!=(i=a.__.pendingElement)?i:t.options.defaultPendingElement;var s;if(a.options.pendingMs||e)return null!=(s=e)?s:null}return null}return null!=(n=a.__.element)?n:t.options.defaultElement})(),i=null!=(e=null==a?void 0:a.options.catchElement)?e:t.options.defaultCatchElement;return o.createElement(re,{value:n,key:a.matchId},o.createElement(le,{catchElement:i},r))}class le extends o.Component{constructor(){super(...arguments),this.state={error:!1},this.reset=()=>{this.setState({error:!1,info:!1})}}componentDidCatch(e,t){console.error(e),this.setState({error:e,info:t})}render(){var e;const t=null!=(e=this.props.catchElement)?e:ce;return this.state.error?"function"==typeof t?t(this.state):t:this.props.children}}function ce(e){let{error:t}=e;return o.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},o.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),o.createElement("div",{style:{height:".5rem"}}),o.createElement("div",null,o.createElement("pre",null,t.message?o.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)),o.createElement("div",{style:{height:"1rem"}}),o.createElement("div",{style:{fontSize:".8em",borderLeft:"3px solid rgba(127, 127, 127, 1)",paddingLeft:".5rem",opacity:.5}},"If you are the owner of this website, it's highly recommended that you configure your own custom Catch/Error boundaries for the router. You can optionally configure a boundary for each route."))}e.DefaultErrorBoundary=ce,e.MatchesProvider=re,e.Outlet=se,e.RouterProvider=function(e){let{children:t,router:n}=e,a=s(e,ee);return n.update(a),oe(n),ae((()=>n.mount()),[n]),o.createElement(ne.Provider,{value:{router:n}},o.createElement(re,{value:n.state.matches},null!=t?t:o.createElement(se,null)))},e.cascadeLoaderData=U,e.cleanPath=x,e.createBrowserHistory=h,e.createHashHistory=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function o(){var e=y(n.location.hash.substr(1)),t=e.pathname,r=void 0===t?"/":t,o=e.search,i=void 0===o?"":o,s=e.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:r,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)b.call(i),i=null;else{var e=r.Pop,t=o(),n=t[0],a=t[1];if(b.length){if(null!=n){var s=f-n;s&&(i={action:e,location:a,retry:function(){x(-1*s)}},x(s))}}else L(e)}}n.addEventListener(u,s),n.addEventListener("hashchange",(function(){g(o()[1])!==g(_)&&s()}));var h=r.Pop,d=o(),f=d[0],_=d[1],P=m(),b=m();function w(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var a=n.location.href,r=a.indexOf("#");t=-1===r?a:a.slice(0,r)}return t}()+"#"+("string"==typeof e?e:g(e))}function E(e,t){return void 0===t&&(t=null),l({pathname:_.pathname,hash:"",search:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function R(e,t){return[{usr:e.state,key:e.key,idx:t},w(e)]}function S(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function L(e){h=e;var t=o();f=t[0],_=t[1],P.call({action:h,location:_})}function x(e){a.go(e)}null==f&&(f=0,a.replaceState(l({},a.state,{idx:f}),""));var I={get action(){return h},get location(){return _},createHref:w,push:function e(t,o){var i=r.Push,s=E(t,o);if(S(i,s,(function(){e(t,o)}))){var l=R(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}L(i)}},replace:function e(t,n){var o=r.Replace,i=E(t,n);if(S(o,i,(function(){e(t,n)}))){var s=R(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),L(o)}},go:x,back:function(){x(-1)},forward:function(){x(1)},listen:function(e){return P.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener(c,p),function(){t(),b.length||n.removeEventListener(c,p)}}};return I},e.createMemoryHistory=d,e.createReactRouter=function(e){const t=(e,t)=>({linkProps:t=>{var n,a;const{target:r,activeProps:o=(()=>({className:"active"})),inactiveProps:l=(()=>({})),disabled:c,style:u,className:h,onClick:d,onFocus:f,onMouseEnter:p,onMouseLeave:m}=t,v=s(t,$),g=e.buildLink(t);if("external"===g.type){const{href:e}=g;return{href:e}}const{handleClick:y,handleFocus:_,handleEnter:P,handleLeave:b,isActive:w,next:E}=g,R=e=>t=>{t.persist(),e.forEach((e=>{e&&e(t)}))},L=w&&null!=(n=S(o,{}))?n:{},x=w?{}:null!=(a=S(l,{}))?a:{};return i({},L,x,v,{href:c?void 0:E.href,onClick:R([y,d]),onFocus:R([_,f]),onMouseEnter:R([P,p]),onMouseLeave:R([b,m]),target:r,style:i({},u,L.style,x.style),className:[h,L.className,x.className].filter(Boolean).join(" ")||void 0},c?{role:"link","aria-disabled":!0}:void 0,{"data-status":w?"active":void 0})},Link:o.forwardRef(((n,a)=>{const r=e.linkProps(n);return oe(t),o.createElement("a",i({ref:a},r,{children:"function"==typeof n.children?n.children({isActive:"active"===r["data-status"]}):n.children}))})),MatchRoute:t=>{const{pending:n,caseSensitive:a}=t,r=s(t,Z),o=e.matchRoute(r,{pending:n,caseSensitive:a});return o?"function"==typeof t.children?t.children(o):t.children:null}});return Y(i({},e,{createRouter:e=>{const n={useState:()=>(oe(e),e.state),useRoute:t=>{const n=e.getRoute(t);return oe(e),_(n),n},useMatch:t=>{oe(e),_(t!==z);const n=null==(a=ie())?void 0:a[0];var a;const r=e.state.matches.find((e=>e.routeId===t));return _(r),_(n.routeId==(null==r?void 0:r.routeId),(null==r||r.routeId,n.routeId,null==r||r.routeId)),r||_("Match not found!"),r}},a=t(e.getRoute("/"),e);Object.assign(e,n,a)},createRoute:e=>{let{router:n,route:a}=e;const r=t(a,n);Object.assign(a,r)}}))},e.createRoute=H,e.createRouteConfig=function e(t,n,a,r,o){void 0===t&&(t={}),void 0===a&&(a=!0),a&&(t.path=z),r===z&&(r="");let i=a?z:t.path;i&&"/"!==i&&(i=A(i));const s=i||t.id;let l=L([r,s]);i===z&&(i="/"),l!==z&&(l=L(["/",l]));const c=l===z?"/":M(L([o,i]));return{id:l,routeId:s,path:i,fullPath:c,options:t,children:n,createChildren:n=>e(t,n((t=>e(t,void 0,!1,l,c))),!1,r,o),addChildren:n=>e(t,n,!1,r,o),createRoute:t=>e(t,void 0,!1,l,c)}},e.createRouteMatch=W,e.createRouter=Y,e.decode=N,e.defaultParseSearch=q,e.defaultStringifySearch=K,e.encode=D,e.functionalUpdate=S,e.interpolatePath=O,e.invariant=_,e.joinPaths=L,e.last=E,e.matchByPath=T,e.matchPathname=j,e.parsePathname=C,e.parseSearchWith=Q,e.replaceEqualDeep=P,e.resolvePath=k,e.rootRouteId=z,e.stringifySearchWith=V,e.trimPath=A,e.trimPathLeft=I,e.trimPathRight=M,e.warning=R,Object.defineProperty(e,"__esModule",{value:!0})}));
*/function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l.apply(this,arguments)}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(o||(o={}));var c="beforeunload",u="popstate";function d(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function r(){var e=n.location,t=e.pathname,o=e.search,r=e.hash,i=a.state||{};return[i.idx,{pathname:t,search:o,hash:r,state:i.usr||null,key:i.key||"default"}]}var i=null;n.addEventListener(u,(function(){if(i)P.call(i),i=null;else{var e=o.Pop,t=r(),n=t[0],a=t[1];if(P.length){if(null!=n){var s=h-n;s&&(i={action:e,location:a,retry:function(){M(-1*s)}},M(s))}}else R(e)}}));var s=o.Pop,d=r(),h=d[0],f=d[1],_=m(),P=m();function b(e){return"string"==typeof e?e:g(e)}function w(e,t){return void 0===t&&(t=null),l({pathname:f.pathname,hash:"",search:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function E(e,t){return[{usr:e.state,key:e.key,idx:t},b(e)]}function x(e,t,n){return!P.length||(P.call({action:e,location:t,retry:n}),!1)}function R(e){s=e;var t=r();h=t[0],f=t[1],_.call({action:s,location:f})}function M(e){a.go(e)}null==h&&(h=0,a.replaceState(l({},a.state,{idx:h}),""));var A={get action(){return s},get location(){return f},createHref:b,push:function e(t,r){var i=o.Push,s=w(t,r);if(x(i,s,(function(){e(t,r)}))){var l=E(s,h+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}R(i)}},replace:function e(t,n){var r=o.Replace,i=w(t,n);if(x(r,i,(function(){e(t,n)}))){var s=E(i,h),l=s[0],c=s[1];a.replaceState(l,"",c),R(r)}},go:M,back:function(){M(-1)},forward:function(){M(1)},listen:function(e){return _.push(e)},block:function(e){var t=P.push(e);return 1===P.length&&n.addEventListener(c,p),function(){t(),P.length||n.removeEventListener(c,p)}}};return A}function h(e){void 0===e&&(e={});var t=e,n=t.initialEntries,a=void 0===n?["/"]:n,r=t.initialIndex,i=a.map((function(e){return l({pathname:"/",search:"",hash:"",state:null,key:v()},"string"==typeof e?y(e):e)})),s=f(null==r?i.length-1:r,0,i.length-1),c=o.Pop,u=i[s],d=m(),h=m();function p(e,t){return void 0===t&&(t=null),l({pathname:u.pathname,search:"",hash:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function _(e,t,n){return!h.length||(h.call({action:e,location:t,retry:n}),!1)}function P(e,t){c=e,u=t,d.call({action:c,location:u})}function b(e){var t=f(s+e,0,i.length-1),n=o.Pop,a=i[t];_(n,a,(function(){b(e)}))&&(s=t,P(n,a))}var w={get index(){return s},get action(){return c},get location(){return u},createHref:function(e){return"string"==typeof e?e:g(e)},push:function e(t,n){var a=o.Push,r=p(t,n);_(a,r,(function(){e(t,n)}))&&(s+=1,i.splice(s,i.length,r),P(a,r))},replace:function e(t,n){var a=o.Replace,r=p(t,n);_(a,r,(function(){e(t,n)}))&&(i[s]=r,P(a,r))},go:b,back:function(){b(-1)},forward:function(){b(1)},listen:function(e){return d.push(e)},block:function(e){return h.push(e)}};return w}function f(e,t,n){return Math.min(Math.max(e,t),n)}function p(e){e.preventDefault(),e.returnValue=""}function m(){var e=[];return{get length(){return e.length},push:function(t){return e.push(t),function(){e=e.filter((function(e){return e!==t}))}},call:function(t){e.forEach((function(e){return e&&e(t)}))}}}function v(){return Math.random().toString(36).substr(2,8)}function g(e){var t=e.pathname,n=void 0===t?"/":t,a=e.search,o=void 0===a?"":a,r=e.hash,i=void 0===r?"":r;return o&&"?"!==o&&(n+="?"===o.charAt(0)?o:"?"+o),i&&"#"!==i&&(n+="#"===i.charAt(0)?i:"#"+i),n}function y(e){var t={};if(e){var n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));var a=e.indexOf("?");a>=0&&(t.search=e.substr(a),e=e.substr(0,a)),e&&(t.pathname=e)}return t}function _(e,t){if(!e)throw new Error("Invariant failed")}function P(e,t){if(e===t)return e;const n=Array.isArray(e)&&Array.isArray(t);if(n||b(e)&&b(t)){const a=n?e.length:Object.keys(e).length,o=n?t:Object.keys(t),r=o.length,i=n?[]:{};let s=0;for(let a=0;a<r;a++){const r=n?a:o[a];i[r]=P(e[r],t[r]),i[r]===e[r]&&s++}return a===r&&s===a?e:i}return t}function b(e){if(!w(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!w(n)&&!!n.hasOwnProperty("isPrototypeOf")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e){return e[e.length-1]}function x(e,t){if(e){"undefined"!=typeof console&&console.warn(t);try{throw new Error(t)}catch(e){}}return!0}function R(e,t){return"function"==typeof e?e(t):e}function M(e){return A(e.filter(Boolean).join("/"))}function A(e){return e.replace(/\/{2,}/g,"/")}function S(e){return"/"===e?e:e.replace(/^\/{1,}/,"")}function L(e){return"/"===e?e:e.replace(/\/{1,}$/,"")}function I(e){return L(S(e))}function k(e,t,n){t=t.replace(new RegExp("^"+e),"/"),n=n.replace(new RegExp("^"+e),"/");let a=C(t);const o=C(n);o.forEach(((e,t)=>{if("/"===e.value)t?t===o.length-1&&a.push(e):a=[e];else if(".."===e.value){var n;a.length>1&&"/"===(null==(n=E(a))?void 0:n.value)&&a.pop(),a.pop()}else{if("."===e.value)return;a.push(e)}}));return A(M([e,...a.map((e=>e.value))]))}function C(e){if(!e)return[];const t=[];if("/"===(e=A(e)).slice(0,1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map((e=>e.startsWith("*")?{type:"wildcard",value:e}:":"===e.charAt(0)?{type:"param",value:e}:{type:"pathname",value:e}))),"/"===e.slice(-1)&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function O(e,t,n){return M(C(e).map((e=>{return"*"!==e.value||n?"param"===e.type?null!=(a=t[e.value.substring(1)])?a:"":e.value:"";var a})))}function j(e,t){const n=T(e,t);if(!t.to||n)return null!=n?n:{}}function T(e,t){var n;const a=C(e),o=C(""+(null!=(n=t.to)?n:"*")),r={};return(()=>{for(let e=0;e<Math.max(a.length,o.length);e++){const n=a[e],i=o[e],s=e===o.length-1,l=e===a.length-1;if(i){if("wildcard"===i.type)return!(null==n||!n.value)&&(r["*"]=M(a.slice(e).map((e=>e.value))),!0);if("pathname"===i.type){if("/"===i.value&&(null==n||!n.value))return!0;if(n)if(t.caseSensitive){if(i.value!==n.value)return!1}else if(i.value.toLowerCase()!==n.value.toLowerCase())return!1}if(!n)return!1;if("param"===i.type){if("/"===(null==n?void 0:n.value))return!1;n.value.startsWith(":")||(r[i.value.substring(1)]=n.value)}}if(s&&!l)return!!t.fuzzy}return!0})()?r:void 0}function D(e,t){var n,a,o,r="";for(n in e)if(void 0!==(o=e[n]))if(Array.isArray(o))for(a=0;a<o.length;a++)r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o[a]);else r&&(r+="&"),r+=encodeURIComponent(n)+"="+encodeURIComponent(o);return(t||"")+r}function F(e){if(!e)return"";var t=decodeURIComponent(e);return"false"!==t&&("true"===t||(0*+t==0?+t:t))}function N(e){for(var t,n,a={},o=e.split("&");t=o.shift();)void 0!==a[n=(t=t.split("=")).shift()]?a[n]=[].concat(a[n],F(t.shift())):a[n]=F(t.shift());return a}function B(){return B=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},B.apply(this,arguments)}function H(e,t,n,a){const{id:o,routeId:r,path:i,fullPath:s}=e,l=a.state.actions[o]||(a.state.actions[o]={pending:[],submit:async(e,t)=>{var n;if(!c)return;const o=null==(n=null==t?void 0:t.invalidate)||n,r={submittedAt:Date.now(),status:"pending",submission:e};l.current=r,l.latest=r,l.pending.push(r),a.state=B({},a.state,{currentAction:r,latestAction:r}),a.notify();try{const t=await(null==c.options.action?void 0:c.options.action(e));return r.data=t,o&&(a.invalidateRoute({to:".",fromCurrent:!0}),await a.reload()),r.status="success",t}catch(e){console.error(e),r.error=e,r.status="error"}finally{l.pending=l.pending.filter((e=>e!==r)),a.removeActionQueue.push({action:l,actionState:r}),a.notify()}}},a.state.actions[o]);let c={routeId:o,routeRouteId:r,routePath:i,fullPath:s,options:t,router:a,childRoutes:void 0,parentRoute:n,action:l,buildLink:e=>a.buildLink(B({},e,{from:s})),navigate:e=>a.navigate(B({},e,{from:s})),matchRoute:(e,t)=>a.matchRoute(B({},e,{from:s}),t)};return null==a.options.createRoute||a.options.createRoute({router:a,route:c}),c}function U(e){e.forEach(((t,n)=>{const a=e[n-1];a&&(t.loaderData=P(t.loaderData,B({},a.loaderData,t.routeLoaderData)))}))}const z="__root__",G=["element","errorElement","catchElement","pendingElement"];function W(e,t,n){const a=B({},t,n,{router:e,routeSearch:{},search:{},childMatches:[],status:"idle",routeLoaderData:{},loaderData:{},isPending:!1,isFetching:!1,isInvalid:!1,invalidAt:1/0,getIsInvalid:()=>{const e=Date.now();return a.isInvalid||a.invalidAt<e},__:{abortController:new AbortController,latestId:"",resolve:()=>{},notify:()=>{a.__.resolve(),a.router.notify()},startPending:()=>{var t,n;const o=null!=(t=a.options.pendingMs)?t:e.options.defaultPendingMs,r=null!=(n=a.options.pendingMinMs)?n:e.options.defaultPendingMinMs;a.__.pendingTimeout||"loading"!==a.status||void 0===o||(a.__.pendingTimeout=setTimeout((()=>{a.isPending=!0,a.__.resolve(),void 0!==r&&(a.__.pendingMinPromise=new Promise((e=>a.__.pendingMinTimeout=setTimeout(e,r))))}),o))},cancelPending:()=>{a.isPending=!1,clearTimeout(a.__.pendingTimeout),clearTimeout(a.__.pendingMinTimeout),delete a.__.pendingMinPromise},validate:()=>{var t,n;const o=null!=(t=null==(n=a.parentMatch)?void 0:n.search)?t:e.location.search;try{const e=a.routeSearch,t="object"==typeof a.options.validateSearch?a.options.validateSearch.parse:a.options.validateSearch;let n=P(e,null==t?void 0:t(o));e!==n&&(a.isInvalid=!0),a.routeSearch=n,a.search=P(o,B({},o,n))}catch(e){console.error(e);const t=new Error("Invalid search params found",{cause:e});return t.code="INVALID_SEARCH_PARAMS",a.status="error",void(a.error=t)}}},cancel:()=>{var e;null==(e=a.__.abortController)||e.abort(),a.__.cancelPending()},invalidate:()=>{a.isInvalid=!0},hasLoaders:()=>!!(t.options.loader||t.options.import||G.some((e=>"function"==typeof t.options[e]))),load:async t=>{const n=""+Date.now()+Math.random();return a.__.latestId=n,"idle"===a.status&&(a.status="loading"),a.isInvalid=!1,a.__.loadPromise=new Promise((async o=>{a.isFetching=!0,a.__.resolve=o;const r=(async()=>{const o=a.options.import;o&&(a.__.importPromise=o({params:a.params}).then((e=>{a.__=B({},a.__,e)}))),await a.__.importPromise,a.__.elementsPromise=(async()=>{await Promise.all(G.map((async e=>{const t=a.options[e];if(!a.__[e])if("function"==typeof t){const n=await t(a);a.__[e]=n}else a.__[e]=a.options[e]})))})(),a.__.dataPromise=Promise.resolve().then((async()=>{try{var o,r,i;if(a.options.loader){const e=await a.options.loader({params:a.params,search:a.routeSearch,signal:a.__.abortController.signal});if(n!==a.__.latestId)return a.__.loaderPromise;a.routeLoaderData=P(a.routeLoaderData,e)}a.error=void 0,a.status="success",a.updatedAt=Date.now(),a.invalidAt=a.updatedAt+(null!=(o=null!=(r=null!=(i=null==t?void 0:t.maxAge)?i:a.options.loaderMaxAge)?r:e.options.defaultLoaderMaxAge)?o:0)}catch(e){if(n!==a.__.latestId)return a.__.loaderPromise;a.error=e,a.status="error",a.updatedAt=Date.now()}}));try{if(await Promise.all([a.__.elementsPromise,a.__.dataPromise]),n!==a.__.latestId)return a.__.loaderPromise;a.__.pendingMinPromise&&(await a.__.pendingMinPromise,delete a.__.pendingMinPromise)}finally{if(n!==a.__.latestId)return a.__.loaderPromise;a.__.cancelPending(),a.isPending=!1,a.isFetching=!1,a.__.notify()}})();if(a.__.loaderPromise=r,await r,n!==a.__.latestId)return a.__.loaderPromise;delete a.__.loaderPromise})),await a.__.loadPromise}});return a.hasLoaders()||(a.status="success"),a}const q=Q(JSON.parse),K=V(JSON.stringify);function Q(e){return t=>{"?"===t.substring(0,1)&&(t=t.substring(1));let n=N(t);for(let t in n){const a=n[t];if("string"==typeof a)try{n[t]=e(a)}catch(e){}}return n}}function V(e){return t=>{(t=B({},t))&&Object.keys(t).forEach((n=>{const a=t[n];if(void 0===a||void 0===a)delete t[n];else if(a&&"object"==typeof a&&null!==a)try{t[n]=e(a)}catch(e){}}));const n=D(t).toString();return n?"?"+n:""}}var J;const X=Boolean("undefined"==typeof window||!(null!=(J=window.document)&&J.createElement));function Y(e){var t,n;const a=(null==e?void 0:e.history)||(X?h():d());let o={options:B({defaultLoaderGcMaxAge:3e5,defaultLoaderMaxAge:0,defaultPreloadMaxAge:2e3,defaultPreloadDelay:50},e,{stringifySearch:null!=(t=null==e?void 0:e.stringifySearch)?t:K,parseSearch:null!=(n=null==e?void 0:e.parseSearch)?n:q}),listeners:[],removeActionQueue:[],basepath:"",routeTree:void 0,routesById:{},location:void 0,allRouteInfo:void 0,navigationPromise:Promise.resolve(),resolveNavigation:()=>{},matchCache:{},state:{status:"idle",location:null,matches:[],actions:{},loaderData:{},lastUpdated:Date.now(),isFetching:!1,isPreloading:!1},startedLoadingAt:Date.now(),subscribe:e=>(o.listeners.push(e),()=>{o.listeners=o.listeners.filter((t=>t!==e))}),getRoute:e=>o.routesById[e],notify:()=>{o.state=B({},o.state,{isFetching:"loading"===o.state.status||o.state.matches.some((e=>e.isFetching)),isPreloading:Object.values(o.matchCache).some((e=>e.match.isFetching&&!o.state.matches.find((t=>t.matchId===e.match.matchId))))}),U(o.state.matches),o.listeners.forEach((e=>e()))},mount:()=>{const e=o.buildLocation({to:".",search:!0,hash:!0});e.href!==o.location.href?o.commitLocation(e,!0):o.loadLocation();const t=a.listen((e=>{o.loadLocation(o.parseLocation(e.location,o.location))}));return!X&&window.addEventListener&&(window.addEventListener("visibilitychange",o.onFocus,!1),window.addEventListener("focus",o.onFocus,!1)),()=>{t(),window.removeEventListener("visibilitychange",o.onFocus),window.removeEventListener("focus",o.onFocus)}},onFocus:()=>{o.loadLocation()},update:e=>{Object.assign(o.options,e);const{basepath:t,routeConfig:n}=o.options;return o.basepath=A("/"+(null!=t?t:"")),n&&(o.routesById={},o.routeTree=o.buildRouteTree(n)),o},buildRouteTree:e=>{const t=(e,n)=>e.map((e=>{const a=H(e,e.options,n,o);if(o.routesById[a.routeId])throw new Error;o.routesById[a.routeId]=a;const r=e.children;return a.childRoutes=null!=r&&r.length?t(r,a):void 0,a}));return t([e])[0]},parseLocation:(e,t)=>{var n;const a=o.options.parseSearch(e.search);return{pathname:e.pathname,searchStr:e.search,search:P(null==t?void 0:t.search,a),hash:null!=(n=e.hash.split("#").reverse()[0])?n:"",href:""+e.pathname+e.search+e.hash,state:e.state,key:e.key}},buildLocation:function(e){var t,n,a,r,i,s,l,c,u;void 0===e&&(e={});const d=e.fromCurrent?o.location.pathname:null!=(t=e.from)?t:o.location.pathname;let h=k(null!=(n=o.basepath)?n:"/",d,""+(null!=(a=e.to)?a:"."));const f=o.matchRoutes(o.location.pathname,{strictParseParams:!0}),p=o.matchRoutes(h),m=B({},null==(r=E(f))?void 0:r.params);let v=!0===(null==(i=e.params)||i)?m:R(e.params,m);v&&p.map((e=>e.options.stringifyParams)).filter(Boolean).forEach((e=>{Object.assign({},v,e(v))})),h=O(h,null!=v?v:{});const g=null!=(s=e.__preSearchFilters)&&s.length?e.__preSearchFilters.reduce(((e,t)=>t(e)),o.location.search):o.location.search,y=!0===e.search?g:e.search?null!=(l=R(e.search,g))?l:{}:null!=(c=e.__preSearchFilters)&&c.length?g:{},_=null!=(u=e.__postSearchFilters)&&u.length?e.__postSearchFilters.reduce(((e,t)=>t(e)),y):y,b=P(o.location.search,_),w=o.options.stringifySearch(b);let x=!0===e.hash?o.location.hash:R(e.hash,o.location.hash);return x=x?"#"+x:"",{pathname:h,search:b,searchStr:w,state:o.location.state,hash:x,href:""+h+w+x,key:e.key}},commitLocation:(e,t)=>{const n=""+Date.now()+Math.random();o.navigateTimeout&&clearTimeout(o.navigateTimeout);let r="replace";t||(r="push");return o.parseLocation(a.location).href===e.href&&!e.key&&(r="replace"),"replace"===r?a.replace({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}):a.push({pathname:e.pathname,hash:e.hash,search:e.searchStr},{id:n}),o.navigationPromise=new Promise((e=>{const t=o.resolveNavigation;o.resolveNavigation=()=>{t(),e()}})),o.navigationPromise},buildNext:e=>{const t=o.buildLocation(e),n=o.matchRoutes(t.pathname),a=n.map((e=>{var t;return null!=(t=e.options.preSearchFilters)?t:[]})).flat().filter(Boolean),r=n.map((e=>{var t;return null!=(t=e.options.postSearchFilters)?t:[]})).flat().filter(Boolean);return o.buildLocation(B({},e,{__preSearchFilters:a,__postSearchFilters:r}))},cancelMatches:()=>{var e,t;[...o.state.matches,...null!=(e=null==(t=o.state.pending)?void 0:t.matches)?e:[]].forEach((e=>{e.cancel()}))},loadLocation:async e=>{const t=Math.random();o.startedLoadingAt=t,e&&(o.location=e),o.removeActionQueue.forEach((e=>{let{action:t,actionState:n}=e;o.state.currentAction===n&&(o.state.currentAction=void 0),t.current===n&&(t.current=void 0)})),o.removeActionQueue=[],o.cancelMatches();const n=o.matchRoutes(location.pathname,{strictParseParams:!0});if(o.state=B({},o.state,{pending:{matches:n,location:o.location},status:"loading"}),o.notify(),await o.loadMatches(n,{withPending:!0}),o.startedLoadingAt!==t)return o.navigationPromise;const a=o.state.matches,r=[],i=[];a.forEach((e=>{n.find((t=>t.matchId===e.matchId))?i.push(e):r.push(e)}));const s=Date.now();r.forEach((e=>{var t,n,a,r;null==e.__.onExit||e.__.onExit({params:e.params,search:e.routeSearch}),"error"!==e.status||e.isFetching||(e.status="idle",e.error=void 0);const i=Math.max(null!=(t=null!=(n=e.options.loaderGcMaxAge)?n:o.options.defaultLoaderGcMaxAge)?t:0,null!=(a=null!=(r=e.options.loaderMaxAge)?r:o.options.defaultLoaderMaxAge)?a:0);i>0&&(o.matchCache[e.matchId]={gc:i==1/0?Number.MAX_SAFE_INTEGER:s+i,match:e})})),i.forEach((e=>{null==e.options.onTransition||e.options.onTransition({params:e.params,search:e.routeSearch})}));n.filter((e=>!a.find((t=>t.matchId===e.matchId)))).forEach((e=>{e.__.onExit=null==e.options.onMatch?void 0:e.options.onMatch({params:e.params,search:e.search})})),n.some((e=>"loading"===e.status))&&(o.notify(),await Promise.all(n.map((e=>e.__.loaderPromise||Promise.resolve())))),o.startedLoadingAt===t&&(o.state=B({},o.state,{location:o.location,matches:n,pending:void 0,status:"idle"}),o.notify(),o.resolveNavigation())},cleanMatchCache:()=>{const e=Date.now();Object.keys(o.matchCache).forEach((t=>{const n=o.matchCache[t];"loading"!==n.match.status&&(n.gc>0&&n.gc>e||delete o.matchCache[t])}))},loadRoute:async function(e){void 0===e&&(e=o.location);const t=o.buildNext(e),n=o.matchRoutes(t.pathname,{strictParseParams:!0});return await o.loadMatches(n),n},preloadRoute:async function(e,t){var n,a,r,i,s,l;void 0===e&&(e=o.location);const c=o.buildNext(e),u=o.matchRoutes(c.pathname,{strictParseParams:!0});return await o.loadMatches(u,{preload:!0,maxAge:null!=(n=null!=(a=null!=(r=t.maxAge)?r:o.options.defaultPreloadMaxAge)?a:o.options.defaultLoaderMaxAge)?n:0,gcMaxAge:null!=(i=null!=(s=null!=(l=t.gcMaxAge)?l:o.options.defaultPreloadGcMaxAge)?s:o.options.defaultLoaderGcMaxAge)?i:0}),u},matchRoutes:(e,t)=>{var n,a;o.cleanMatchCache();const r=[];if(!o.routeTree)return r;const i=[...o.state.matches,...null!=(n=null==(a=o.state.pending)?void 0:a.matches)?n:[]],s=async n=>{var a,l,c;const u=E(r);let d=null!=(a=null==u?void 0:u.params)?a:{};const h=null!=(l=null==o.options.filterRoutes?void 0:o.options.filterRoutes(n))?l:n;let f=[];const p=(n,a)=>(a.some((a=>{var r,i,s;if(!a.routePath&&null!=(r=a.childRoutes)&&r.length)return p([...f,a],a.childRoutes);const l=!!("/"!==a.routePath||null!=(i=a.childRoutes)&&i.length),c=j(e,{to:a.fullPath,fuzzy:l,caseSensitive:null!=(s=a.options.caseSensitive)?s:o.options.caseSensitive});if(c){let e;try{var u;e=null!=(u=null==a.options.parseParams?void 0:a.options.parseParams(c))?u:c}catch(e){if(null!=t&&t.strictParseParams)throw e}d=B({},d,e)}return c&&(f=[...n,a]),!!f.length})),!!f.length);if(p([],h),!f.length)return;f.forEach((t=>{var n;const a=O(t.routePath,d),s=O(t.routeId,d,!0),l=i.find((e=>e.matchId===s))||(null==(n=o.matchCache[s])?void 0:n.match)||W(o,t,{matchId:s,params:d,pathname:M([e,a])});r.push(l)}));const m=E(f);null!=(c=m.childRoutes)&&c.length&&s(m.childRoutes)};return s([o.routeTree]),U(r),r},loadMatches:async(e,t)=>{const n=Date.now(),a=null!=t&&t.preload?Math.max(null==t?void 0:t.maxAge,null==t?void 0:t.gcMaxAge):0,r=e.map((async e=>{if(e.__.validate(),null!=t&&t.preload&&a>0){if(o.state.matches.find((t=>t.matchId===e.matchId)))return;o.matchCache[e.matchId]={gc:n+t.gcMaxAge,match:e}}if("success"===e.status&&e.getIsInvalid()||"error"===e.status||"idle"===e.status){const n=null!=t&&t.preload?null==t?void 0:t.maxAge:void 0;e.load({maxAge:n})}"loading"===e.status&&(null!=t&&t.withPending&&e.__.startPending(),await e.__.loadPromise)}));o.notify(),await Promise.all(r)},invalidateRoute:e=>{var t,n;const a=o.buildNext(e),r=o.matchRoutes(a.pathname).map((e=>e.matchId));[...o.state.matches,...null!=(t=null==(n=o.state.pending)?void 0:n.matches)?t:[]].forEach((e=>{r.includes(e.matchId)&&e.invalidate()}))},reload:()=>o._navigate({fromCurrent:!0,replace:!0,search:!0}),resolvePath:(e,t)=>k(o.basepath,e,A(t)),matchRoute:(e,t)=>{var n;e=B({},e,{to:e.to?o.resolvePath(null!=(n=e.from)?n:"",e.to):void 0});const a=o.buildNext(e);var r;return null!=t&&t.pending?!(null==(r=o.state.pending)||!r.location)&&!!j(o.state.pending.location.pathname,B({},t,{to:a.pathname})):!!j(o.state.location.pathname,B({},t,{to:a.pathname}))},_navigate:e=>{const t=o.buildNext(e);return o.commitLocation(t,e.replace)},navigate:async e=>{let{from:t,to:n=".",search:a,hash:r,replace:i,params:s}=e;const l=String(n),c=String(t);let u;try{new URL(""+l),u=!0}catch(e){}return _(!u),o._navigate({from:c,to:l,search:a,hash:r,replace:i,params:s})},buildLink:e=>{var t,n;let{from:a,to:r=".",search:i,params:s,hash:l,target:c,replace:u,activeOptions:d,preload:h,preloadMaxAge:f,preloadGcMaxAge:p,preloadDelay:m,disabled:v}=e;try{return new URL(""+r),{type:"external",href:r}}catch(e){}const g={from:a,to:r,search:i,params:s,hash:l,replace:u},y=o.buildNext(g);h=null!=(t=h)?t:o.options.defaultPreload;const _=null!=(n=null!=m?m:o.options.defaultPreloadDelay)?n:0,P=o.state.location.pathname===y.pathname,b=o.state.location.pathname.split("/"),w=y.pathname.split("/").every(((e,t)=>e===b[t])),E=o.state.location.hash===y.hash,x=null!=d&&d.exact?P:w,R=null==d||!d.includeHash||E;return{type:"internal",next:y,handleFocus:e=>{h&&o.preloadRoute(g,{maxAge:f,gcMaxAge:p})},handleClick:e=>{v||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||e.defaultPrevented||c&&"_self"!==c||0!==e.button||(e.preventDefault(),!P||i||l||o.invalidateRoute(g),o._navigate(g))},handleEnter:e=>{const t=e.target||{};if(h){if(t.preloadTimeout)return;t.preloadTimeout=setTimeout((()=>{t.preloadTimeout=null,o.preloadRoute(g,{maxAge:f,gcMaxAge:p})}),_)}},handleLeave:e=>{const t=e.target||{};t.preloadTimeout&&(clearTimeout(t.preloadTimeout),t.preloadTimeout=null)},isActive:x&&R,disabled:v}}};return o.location=o.parseLocation(a.location),o.state.location=o.location,o.update(e),null==o.options.createRouter||o.options.createRouter(o),o}const $=["type","children","target","activeProps","inactiveProps","activeOptions","disabled","hash","search","params","to","preload","preloadDelay","preloadMaxAge","replace","style","className","onClick","onFocus","onMouseEnter","onMouseLeave","onTouchStart","onTouchEnd"],Z=["pending","caseSensitive","children"],ee=["children","router"],te=r.createContext(null),ne=r.createContext(null),ae=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement)?r.useLayoutEffect:r.useEffect;function oe(e){return r.createElement(te.Provider,e)}const re=e=>{n.useSyncExternalStore((t=>e.subscribe((()=>t()))),(()=>e.state))};function ie(){return r.useContext(te)}function se(){var e;const t=function(){const e=r.useContext(ne);return x(!e,"useRouter must be used inside a <Router> component!"),re(e.router),e.router}(),[,...n]=ie(),a=n[0];if(!a)return null;const o=(()=>{var e,n;if(!a)return null;const o=null!=(e=a.__.errorElement)?e:t.options.defaultErrorElement;if("error"===a.status){if(o)return o;if(a.options.useErrorBoundary||t.options.useErrorBoundary)throw a.error;return r.createElement(ce,{error:a.error})}if("loading"===a.status||"idle"===a.status){if(a.isPending){var i;const e=null!=(i=a.__.pendingElement)?i:t.options.defaultPendingElement;var s;if(a.options.pendingMs||e)return null!=(s=e)?s:null}return null}return null!=(n=a.__.element)?n:t.options.defaultElement})(),i=null!=(e=null==a?void 0:a.options.catchElement)?e:t.options.defaultCatchElement;return r.createElement(oe,{value:n,key:a.matchId},r.createElement(le,{catchElement:i},o))}class le extends r.Component{constructor(){super(...arguments),this.state={error:!1},this.reset=()=>{this.setState({error:!1,info:!1})}}componentDidCatch(e,t){console.error(e),this.setState({error:e,info:t})}render(){var e;const t=null!=(e=this.props.catchElement)?e:ce;return this.state.error?"function"==typeof t?t(this.state):t:this.props.children}}function ce(e){let{error:t}=e;return r.createElement("div",{style:{padding:".5rem",maxWidth:"100%"}},r.createElement("strong",{style:{fontSize:"1.2rem"}},"Something went wrong!"),r.createElement("div",{style:{height:".5rem"}}),r.createElement("div",null,r.createElement("pre",null,t.message?r.createElement("code",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".5rem",color:"red"}},t.message):null)),r.createElement("div",{style:{height:"1rem"}}),r.createElement("div",{style:{fontSize:".8em",borderLeft:"3px solid rgba(127, 127, 127, 1)",paddingLeft:".5rem",opacity:.5}},"If you are the owner of this website, it's highly recommended that you configure your own custom Catch/Error boundaries for the router. You can optionally configure a boundary for each route."))}e.DefaultErrorBoundary=ce,e.MatchesProvider=oe,e.Outlet=se,e.RouterProvider=function(e){let{children:t,router:n}=e,a=s(e,ee);return n.update(a),re(n),ae((()=>n.mount()),[n]),r.createElement(ne.Provider,{value:{router:n}},r.createElement(oe,{value:n.state.matches},null!=t?t:r.createElement(se,null)))},e.cascadeLoaderData=U,e.cleanPath=A,e.createBrowserHistory=d,e.createHashHistory=function(e){void 0===e&&(e={});var t=e.window,n=void 0===t?document.defaultView:t,a=n.history;function r(){var e=y(n.location.hash.substr(1)),t=e.pathname,o=void 0===t?"/":t,r=e.search,i=void 0===r?"":r,s=e.hash,l=void 0===s?"":s,c=a.state||{};return[c.idx,{pathname:o,search:i,hash:l,state:c.usr||null,key:c.key||"default"}]}var i=null;function s(){if(i)b.call(i),i=null;else{var e=o.Pop,t=r(),n=t[0],a=t[1];if(b.length){if(null!=n){var s=f-n;s&&(i={action:e,location:a,retry:function(){A(-1*s)}},A(s))}}else M(e)}}n.addEventListener(u,s),n.addEventListener("hashchange",(function(){g(r()[1])!==g(_)&&s()}));var d=o.Pop,h=r(),f=h[0],_=h[1],P=m(),b=m();function w(e){return function(){var e=document.querySelector("base"),t="";if(e&&e.getAttribute("href")){var a=n.location.href,o=a.indexOf("#");t=-1===o?a:a.slice(0,o)}return t}()+"#"+("string"==typeof e?e:g(e))}function E(e,t){return void 0===t&&(t=null),l({pathname:_.pathname,hash:"",search:""},"string"==typeof e?y(e):e,{state:t,key:v()})}function x(e,t){return[{usr:e.state,key:e.key,idx:t},w(e)]}function R(e,t,n){return!b.length||(b.call({action:e,location:t,retry:n}),!1)}function M(e){d=e;var t=r();f=t[0],_=t[1],P.call({action:d,location:_})}function A(e){a.go(e)}null==f&&(f=0,a.replaceState(l({},a.state,{idx:f}),""));var S={get action(){return d},get location(){return _},createHref:w,push:function e(t,r){var i=o.Push,s=E(t,r);if(R(i,s,(function(){e(t,r)}))){var l=x(s,f+1),c=l[0],u=l[1];try{a.pushState(c,"",u)}catch(e){n.location.assign(u)}M(i)}},replace:function e(t,n){var r=o.Replace,i=E(t,n);if(R(r,i,(function(){e(t,n)}))){var s=x(i,f),l=s[0],c=s[1];a.replaceState(l,"",c),M(r)}},go:A,back:function(){A(-1)},forward:function(){A(1)},listen:function(e){return P.push(e)},block:function(e){var t=b.push(e);return 1===b.length&&n.addEventListener(c,p),function(){t(),b.length||n.removeEventListener(c,p)}}};return S},e.createMemoryHistory=h,e.createReactRouter=function(e){const t=(e,t)=>({linkProps:t=>{var n,a;const{target:o,activeProps:r=(()=>({className:"active"})),inactiveProps:l=(()=>({})),disabled:c,style:u,className:d,onClick:h,onFocus:f,onMouseEnter:p,onMouseLeave:m}=t,v=s(t,$),g=e.buildLink(t);if("external"===g.type){const{href:e}=g;return{href:e}}const{handleClick:y,handleFocus:_,handleEnter:P,handleLeave:b,isActive:w,next:E}=g,x=e=>t=>{t.persist(),e.forEach((e=>{e&&e(t)}))},M=w&&null!=(n=R(r,{}))?n:{},A=w?{}:null!=(a=R(l,{}))?a:{};return i({},M,A,v,{href:c?void 0:E.href,onClick:x([y,h]),onFocus:x([_,f]),onMouseEnter:x([P,p]),onMouseLeave:x([b,m]),target:o,style:i({},u,M.style,A.style),className:[d,M.className,A.className].filter(Boolean).join(" ")||void 0},c?{role:"link","aria-disabled":!0}:void 0,{"data-status":w?"active":void 0})},Link:r.forwardRef(((n,a)=>{const o=e.linkProps(n);return re(t),r.createElement("a",i({ref:a},o,{children:"function"==typeof n.children?n.children({isActive:"active"===o["data-status"]}):n.children}))})),MatchRoute:t=>{const{pending:n,caseSensitive:a}=t,o=s(t,Z),r=e.matchRoute(o,{pending:n,caseSensitive:a});return r?"function"==typeof t.children?t.children(r):t.children:null}});return Y(i({},e,{createRouter:e=>{const n={useState:()=>(re(e),e.state),useRoute:t=>{const n=e.getRoute(t);return re(e),_(n),n},useMatch:t=>{re(e),_(t!==z);const n=null==(a=ie())?void 0:a[0];var a;const o=e.state.matches.find((e=>e.routeId===t));return _(o),_(n.routeId==(null==o?void 0:o.routeId),(null==o||o.routeId,n.routeId,null==o||o.routeId)),o||_("Match not found!"),o}},a=t(e.getRoute("/"),e);Object.assign(e,n,a)},createRoute:e=>{let{router:n,route:a}=e;const o=t(a,n);Object.assign(a,o)}}))},e.createRoute=H,e.createRouteConfig=function e(t,n,a,o,r){void 0===t&&(t={}),void 0===a&&(a=!0),a&&(t.path=z),o===z&&(o="");let i=a?z:t.path;i&&"/"!==i&&(i=I(i));const s=i||t.id;let l=M([o,s]);i===z&&(i="/"),l!==z&&(l=M(["/",l]));const c=l===z?"/":L(M([r,i]));return{id:l,routeId:s,path:i,fullPath:c,options:t,children:n,createChildren:n=>e(t,n((t=>e(t,void 0,!1,l,c))),!1,o,r),addChildren:n=>e(t,n,!1,o,r),createRoute:t=>e(t,void 0,!1,l,c)}},e.createRouteMatch=W,e.createRouter=Y,e.decode=N,e.defaultParseSearch=q,e.defaultStringifySearch=K,e.encode=D,e.functionalUpdate=R,e.interpolatePath=O,e.invariant=_,e.joinPaths=M,e.last=E,e.matchByPath=T,e.matchPathname=j,e.parsePathname=C,e.parseSearchWith=Q,e.replaceEqualDeep=P,e.resolvePath=k,e.rootRouteId=z,e.stringifySearchWith=V,e.trimPath=I,e.trimPathLeft=S,e.trimPathRight=L,e.warning=x,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.production.js.map
{
"name": "@tanstack/react-router",
"author": "Tanner Linsley",
"version": "0.0.1-alpha.8",
"version": "0.0.1-alpha.9",
"license": "MIT",

@@ -43,3 +43,3 @@ "repository": "tanstack/router",

"@babel/runtime": "^7.16.7",
"@tanstack/router-core": "0.0.1-alpha.8",
"@tanstack/router-core": "0.0.1-alpha.9",
"use-sync-external-store": "^1.2.0"

@@ -46,0 +46,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc