1/*! LICENSE: lib-router.ca57f211a4.js.LICENSE.txt */ 2"use strict";(self.rspackChunkvagaro_websitebuilder_consumer=self.rspackChunkvagaro_websitebuilder_consumer||[]).push([[9535],{91867(e,t,n){n.d(t,{Kd:()=>P});var r,a,o,i,l,u,s,c,h,p=n(96540),d=n.t(p,2),m=n(40961),f=n.t(m,2);function g(){return(g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}(r=u||(u={})).Pop="POP",r.Push="PUSH",r.Replace="REPLACE";let y="popstate";function v(e,t){if(!1===e||null==e)throw Error(t)}function w(e,t){return{usr:e.state,key:e.key,idx:t}}function b(e,t,n,r){return void 0===n&&(n=null),g({pathname:"string"==typeof e?e:e.pathname,search:"",hash:""},"string"==typeof t?R(t):t,{state:n,key:t&&t.key||r||Math.random().toString(36).substr(2,8)})}function E(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function R(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}(a=s||(s={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";function x(){return(x=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}Symbol("deferred");let C=p.createContext(null),S=p.createContext(null);function L(e){let{basename:t="/",children:n=null,location:r,navigationType:a=u.Pop,navigator:o,static:i=!1,future:l}=e;null!=p.useContext(S)&&v(!1);let s=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:s,navigator:o,static:i,future:x({v7_relativeSplatPath:!1},l)}),[s,l,o,i]);"string"==typeof r&&(r=R(r));let{pathname:h="/",search:d="",hash:m="",state:f=null,key:g="default"}=r,y=p.useMemo(()=>{let e=function(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}(h,s);return null==e?null:{location:{pathname:e,search:d,hash:m,state:f,key:g},navigationType:a}},[s,h,d,m,f,g,a]);return null==y?null:p.createElement(C.Provider,{value:c},p.createElement(S.Provider,{children:n,value:y}))}p.Component,d.startTransition;var k=((o=k||{})[o.pending=0]="pending",o[o.success=1]="success",o[o.error=2]="error",o);new Promise(()=>{}),p.Component;try{window.__reactRouterVersion="6"}catch(e){}let $=d.startTransition;function P(e){let{basename:t,children:n,future:r,window:a}=e,o=p.useRef();null==o.current&&(o.current=function(e,t,n){void 0===n&&(n={});let{window:r=document.defaultView,v5Compat:a=!1}=n,o=r.history,i=u.Pop,l=null,s=c();function c(){return(o.state||{idx:null}).idx}function h(){i=u.Pop;let e=c(),t=null==e?null:e-s;s=e,l&&l({action:i,location:d.location,delta:t})}function p(e){let t="null"!==r.location.origin?r.location.origin:r.location.href,n="string"==typeof e?e:E(e);return v(t,"No window.location.(origin|href) available to create URL for href: "+(n=n.replace(/ $/,"%20"))),new URL(n,t)}null==s&&(s=0,o.replaceState(g({},o.state,{idx:s}),""));let d={get action(){return i},get location(){return e(r,o)},listen(e){if(l)throw Error("A history only accepts one active listener");return r.addEventListener(y,h),l=e,()=>{r.removeEventListener(y,h),l=null}},createHref:e=>t(r,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){i=u.Push;let n=b(d.location,e,t);let h=w(n,s=c()+1),p=d.createHref(n);try{o.pushState(h,"",p)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;r.location.assign(p)}a&&l&&l({action:i,location:d.location,delta:1})},replace:function(e,t){i=u.Replace;let n=b(d.location,e,t);let r=w(n,s=c()),h=d.createHref(n);o.replaceState(r,"",h),a&&l&&l({action:i,location:d.location,delta:0})},go:e=>o.go(e)};return d}(function(e,t){let{pathname:n,search:r,hash:a}=e.location;return b("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"==typeof t?t:E(t)},{window:a,v5Compat:!0}));let i=o.current,[l,s]=p.useState({action:i.action,location:i.location}),{v7_startTransition:c}=r||{},h=p.useCallback(e=>{c&&$?$(()=>s(e)):s(e)},[s,c]);return p.useLayoutEffect(()=>i.listen(h),[i,h]),p.useEffect(()=>(function(e){null==e||e.v7_startTransition,null==e||e.v7_relativeSplatPath}
2)(r),[r]),p.createElement(L,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:i,future:r})}f.flushSync,d.useId,"u">typeof window&&void 0!==window.document&&window.document.createElement,(i=c||(c={})).UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState",(l=h||(h={})).UseFetcher="useFetcher",l.UseFetchers="useFetchers",l.UseScrollRestoration="useScrollRestoration"},99060(e,t,n){n.d(t,{BV:()=>eb,KC:()=>ea,Kd:()=>eI,Zp:()=>en,qh:()=>ev,sv:()=>ey,zy:()=>Q});var r,a=n(96540),o=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,i=/^[\\/]{2}/,l="popstate";function u(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function s(e,t){if(!1===e||null==e)throw Error(t)}function c(e,t){if(!e){"u">typeof console&&console.warn(t);try{throw Error(t)}catch(e){}}}function h(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function p(e,t,n=null,r,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?m(t):t,state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10),mask:a}}function d({pathname:e="/",search:t="",hash:n=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),n&&"#"!==n&&(e+="#"===n.charAt(0)?n:"#"+n),e}function m(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function f(e,t,n="/"){return g(e,t,n,!1)}function g(e,t,n,r,a){let o,i=R(("string"==typeof t?m(t):t).pathname||"/",n);if(null==i)return null;let l=a??((o=function e(t,n=[],r=[],a="",o=!1){let i=(t,i,l=o,u)=>{var c,h;let p,d,m={relativePath:void 0===u?t.path||"":u,caseSensitive:!0===t.caseSensitive,childrenIndex:i,route:t};if(m.relativePath.startsWith("/")){if(!m.relativePath.startsWith(a)&&l)return;s(m.relativePath.startsWith(a),`Absolute route path "${m.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),m.relativePath=m.relativePath.slice(a.length)}let f=$([a,m.relativePath]),g=r.concat(m);t.children&&t.children.length>0&&(s(!0!==t.index,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),e(t.children,n,g,f,l)),(null!=t.path||t.index)&&n.push({path:f,score:(c=f,h=t.index,d=(p=c.split("/")).length,p.some(v)&&(d+=-2),h&&(d+=2),p.filter(e=>!v(e)).reduce((e,t)=>e+(y.test(t)?3:""===t?1:10),d)),routesMeta:g.map((e,t)=>{let[n,r]=E(e.relativePath,e.caseSensitive,t===g.length-1);return{...e,matcher:n,compiledParams:r}})})};return t.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let n of function e(t){let n=t.split("/");if(0===n.length)return[];let[r,...a]=n,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===a.length)return o?[i,""]:[i];let l=e(a.join("/")),u=[];return u.push(...l.map(e=>""===e?i:[i,e].join("/"))),o&&u.push(...l),u.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))i(e,t,!0,n);else i(e,t)}),n}(e)).sort((e,t)=>{var n,r;return e.score!==t.score?t.score-e.score:(n=e.routesMeta.map(e=>e.childrenIndex),r=t.routesMeta.map(e=>e.childrenIndex),n.length===r.length&&n.slice(0,-1).every((e,t)=>e===r[t])?n[n.length-1]-r[r.length-1]:0)}),o),u=null,h=function(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return c(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}(i);for(let e=0;null==u&&e<l.length;++e)u=function(e,t,n=!1){let{routesMeta:r}=e,a={},o="/",i=[];for(let e=0;e<r.length;++e){let l=r[e],u=e===r.length-1,s="/"===o?t:t.slice(o.length)||"/",c={path:l.relativePath,caseSensitive:l.caseSensitive,end:u},h=l.matcher&&l.compiledParams?b(c,s,l.matcher,l.compiledParams):w(c,s),p=l.route;if(!h&&u&&n&&!r[r.length-1].route.index&&(h=w({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},s)),!h)return null;
2Object.assign(a,h.params),i.push({params:a,pathname:$([o,h.pathname]),pathnameBase:O($([o,h.pathnameBase])),route:p}),"/"!==h.pathnameBase&&(o=$([o,h.pathnameBase]))}return i}(l[e],h,r);return u}new WeakMap;var y=/^:[\w-]+$/,v=e=>"*"===e;function w(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=E(e.path,e.caseSensitive,e.end);return b(e,t,n,r)}function b(e,t,n,r){let a=t.match(n);if(!a)return null;let o=a[0],i=P(o,1),l=a.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if("*"===t){let e=l[r]||"";i=P(o.slice(0,o.length-e.length),1)}let a=l[r];return n&&!a?e[t]=void 0:e[t]=(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function E(e,t=!1,n=!0){c("*"===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(/\*$/,"/*")}".`);let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n,a,o)=>{if(r.push({paramName:t,isOptional:null!=n}),n){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function R(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function x(e,t){let n=P(t).split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function C(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function S(e){let t=e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function L(e,t,n,r=!1){let a,o;"string"==typeof e?a=m(e):(s(!(a={...e}).pathname||!a.pathname.includes("?"),C("?","pathname","search",a)),s(!a.pathname||!a.pathname.includes("#"),C("#","pathname","hash",a)),s(!a.search||!a.search.includes("#"),C("#","search","hash",a)));let i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=n;else{let e=t.length-1;if(!r&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let u=function(e,t="/"){let{pathname:n,search:r="",hash:a=""}="string"==typeof e?m(e):e;return{pathname:n?(n=k(n)).startsWith("/")||n.startsWith("\\")?x(n.substring(1),"/"):x(n,t):t,search:T(r),hash:F(a)}}(a,o),c=l&&"/"!==l&&l.endsWith("/"),h=(i||"."===l)&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||h)&&(u.pathname+="/"),u}var k=e=>e.replace(/[\\/]{2,}/g,"/"),$=e=>k(e.join("/"));function P(e,t=0){let n=e.length;for(;n>t&&47===e.charCodeAt(n-1);)n--;return n===e.length?e:e.slice(0,n)}var O=e=>P(e).replace(/^\/*/,"/"),T=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",F=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",U=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function A(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}var M="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function W(e,t){let n=e;if("string"!=typeof n||!o.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(M)try{var l;let e=new URL(window.location.href),r=new URL(i.test(n)?(l=n,e.protocol+l.replace(/\\/g,"/")):n),o=R(r.pathname,t);r.origin===e.origin&&null!=o?n=o+r.search+r.hash:a=!0}catch(e){c(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:a,to:n}}Symbol("Uninstrumented"),Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var N=new URL("http://localhost");function j(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),N)}catch{return N}}function _(e,t){return e.origin===t.origin&&("null"!==e.origin||e.protocol===t.protocol&&e.host===t.host)}function D(e,t,n,r){let a=null;try{a=null==e?null:new URL(e,n)}catch{}let o=new URL(t,n),i=null!=a&&!_(a,n),l=!_(o,n);if("reject"===r){if(i||l)throw Error("External navigation is not allowed")}else if(l&&(null==a||!function(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return!!e.toLowerCase().startsWith(n)&&(""===t.host||e.slice(n.length).startsWith("//"))}
2(e,a)||!_(a,o)))throw Error("External navigation is not allowed")}Symbol("ResetLoaderData"),new WeakMap,new WeakMap,new WeakMap,new WeakMap;var B=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"],H=a.createContext(null);H.displayName="DataRouter";var I=a.createContext(null);I.displayName="DataRouterState";var z=a.createContext(!1);function V(){return a.useContext(z)}var J=a.createContext({isTransitioning:!1});J.displayName="ViewTransition",a.createContext(new Map).displayName="Fetchers",a.createContext(null).displayName="Await";var K=a.createContext(null);K.displayName="Navigation";var Y=a.createContext(null);Y.displayName="Location";var q=a.createContext({outlet:null,matches:[],isDataRoute:!1});q.displayName="Route";var X=a.createContext(null);X.displayName="RouteError";var Z="REACT_ROUTER_ERROR";function G(){return null!=a.useContext(Y)}function Q(){return s(G(),"useLocation() may be used only in the context of a <Router> component."),a.useContext(Y).location}var ee="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function et(e){a.useContext(K).static||a.useLayoutEffect(e)}function en(){let{isDataRoute:e}=a.useContext(q);return e?function(){let e,{router:t}=(s(e=a.useContext(H),ep("useNavigate")),e),n=em("useNavigate"),r=a.useRef(!1);return et(()=>{r.current=!0}),a.useCallback(async(e,a={})=>{c(r.current,ee),r.current&&("number"==typeof e?await t.navigate(e):await t.navigate(e,{fromRouteId:n,...a}))},[t,n])}():function(){s(G(),"useNavigate() may be used only in the context of a <Router> component.");let e=a.useContext(H),{basename:t,navigator:n}=a.useContext(K),{matches:r}=a.useContext(q),{pathname:o}=Q(),i=JSON.stringify(S(r)),l=a.useRef(!1);return et(()=>{l.current=!0}),a.useCallback((r,a={})=>
2{if(c(l.current,ee),!l.current)return;if("number"==typeof r)return void n.go(r);let u=L(r,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(u.pathname="/"===u.pathname?t:$([t,u.pathname])),D("string"==typeof r?r:d(r),n.createHref(u),j(n),"reject"),(a.replace?n.replace:n.push)(u,a.state,a)},[t,n,i,o,e])}()}var er=a.createContext(null);function ea(){return a.useContext(er)}function eo(e,{relative:t}={}){let{matches:n}=a.useContext(q),{pathname:r}=Q(),o=JSON.stringify(S(n));return a.useMemo(()=>L(e,JSON.parse(o),r,"path"===t),[e,o,r,t])}function ei(e,t,n){let r;s(G(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=a.useContext(K),{matches:i}=a.useContext(q),l=i[i.length-1],u=l?l.params:{},h=l?l.pathname:"/",p=l?l.pathnameBase:"/",d=l&&l.route;{let e=d&&d.path||"";eg(h,!d||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. 3 4Please change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}let g=Q();if(t){let e="string"==typeof t?m(t):t;s("/"===p||e.pathname?.startsWith(p),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${p}" but pathname "${e.pathname}" was given in the \`location\` prop.`),r=e}else r=g;let y=r.pathname||"/",v=y;if("/"!==p){let e=p.replace(/^\//,"").split("/");v="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let w=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):f(e,{pathname:v});c(d||null!=w,`No routes matched location "${r.pathname}${r.search}${r.hash}" `),c(null==w||void 0!==w[w.length-1].route.element||void 0!==w[w.length-1].route.Component||void 0!==w[w.length-1].route.lazy,`Matched leaf route at location "${r.pathname}${r.search}${r.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let b=function(e,t=[],n){let r=n?.state;if(null==e){if(!r)return null;if(r.errors)e=r.matches;else{if(0!==t.length||r.initialized||!(r.matches.length>0))return null;e=r.matches}}let o=e,i=r?.errors;if(null!=i){let e=o.findIndex(e=>e.route.id&&i?.[e.route.id]!==void 0);s(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,e+1))}let l=!1,u=-1;if(n&&r){l=r.renderFallback;for(let e=0;e<o.length;e++){let t=o[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(u=e),t.route.id){let{loaderData:e,errors:a}=r,i=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||void 0===a[t.route.id]);if(t.route.lazy||i){n.isStatic&&(l=!0),o=u>=0?o.slice(0,u+1):[o[0]];break}}}}let c=n?.onError,h=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:$(r.matches.map(e=>e.route.path).filter(Boolean))||"/",errorInfo:t})}:void 0;return o.reduceRight((e,n,s)=>{let c,p=!1,d=null,m=null;r&&(c=i&&n.route.id?i[n.route.id]:void 0,d=n.route.errorElement||el,l&&(u<0&&0===s?(eg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),p=!0,m=null):u===s&&(p=!0,m=n.route.hydrateFallbackElement||null)));let f=t.concat(o.slice(0,s+1)),g=()=>{let t;return t=c?d:p?m:n.route.Component?a.createElement(n.route.Component,null):n.route.element?n.route.element:e,a.createElement(eh,{match:n,routeContext:{outlet:e,matches:f,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===s)?a.createElement(eu,{location:r.location,revalidation:r.revalidation,component:d,error:c,children:g(),routeContext:{outlet:null,matches:f,isDataRoute:!0},onError:h}):g()},null)}(w&&w.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:$([p,o.encodeLocation?o.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?p:$([p,o.encodeLocation?o.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),i,n);return t&&b?a.createElement(Y.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...r},navigationType:"POP"}},b):b}
4var el=a.createElement(function(){let e,t,n,r=(e=a.useContext(X),t=ed("useRouteError"),n=em("useRouteError"),void 0!==e?e:t.errors?.[n]),o=A(r)?`${r.status} ${r.statusText}`:r instanceof Error?r.message:JSON.stringify(r),i=r instanceof Error?r.stack:null,l="rgba(200,200,200, 0.5)",u={padding:"2px 4px",backgroundColor:l},s=null;return console.error("Error handled by React Router default ErrorBoundary:",r),s=a.createElement(a.Fragment,null,a.createElement("p",null,"ð¿ Hey developer ð"),a.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",a.createElement("code",{style:u},"ErrorBoundary")," or"," ",a.createElement("code",{style:u},"errorElement")," prop on your route.")),a.createElement(a.Fragment,null,a.createElement("h2",null,"Unexpected Application Error!"),a.createElement("h3",{style:{fontStyle:"italic"}},o),i?a.createElement("pre",{style:{padding:"0.5rem",backgroundColor:l}},i):null,s)},null),eu=class extends a.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(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}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){let t=function(e){if(e.startsWith(`${Z}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new U(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?a.createElement(q.Provider,{value:this.props.routeContext},a.createElement(X.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?a.createElement(ec,{error:e},t):t}};eu.contextType=z;var es=new WeakMap;function ec({children:e,error:t}){let{basename:n,navigator:r}=a.useContext(K);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${Z}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let o=es.get(t);if(o)throw o;let i=W(e.location,n),l=i.absoluteURL||i.to;if(D(e.location,l,j(r),"allow-explicit"),function(e){try{return B.includes(new URL(e).protocol)}catch{return!1}}(l))throw Error("Invalid redirect location");if(M&&!es.get(t))if(i.isExternal||e.reloadDocument)window.location.href=l;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw es.set(t,n),n}return a.createElement("meta",{httpEquiv:"refresh",content:`0;url=${l}`})}}return e}function eh({routeContext:e,match:t,children:n}){let r=a.useContext(H);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),a.createElement(q.Provider,{value:e},n)}function ep(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ed(e){let t=a.useContext(I);return s(t,ep(e)),t}function em(e){let t,n=(s(t=a.useContext(q),ep(e)),t),r=n.matches[n.matches.length-1];return s(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}var ef={};function eg(e,t,n){t||ef[e]||(ef[e]=!0,c(!1,n))}function ey(e){var t;let n;return t=e.context,n=a.useContext(q).outlet,a.useMemo(()=>n&&a.createElement(er.Provider,{value:t},n),[n,t])}function ev(e){s(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ew({basename:e="/",children:t=null,location:n,navigationType:r="POP",navigator:o,static:i=!1,useTransitions:l}){s(!G(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),h=a.useMemo(()=>({basename:u,navigator:o,static:i,useTransitions:l,future:{}}),[u,o,i,l]);"string"==typeof n&&(n=m(n));let{pathname:p="/",search:d="",hash:f="",state:g=null,key:y="default",mask:v}=n,w=a.useMemo(()=>{let e=R(p,u);return null==e?null:{location:{pathname:e,search:d,hash:f,state:g,key:y,mask:v},navigationType:r}},[u,p,d,f,g,y,r,v]);
4return(c(null!=w,`<Router basename="${u}"> is not able to match the URL "${p}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),null==w)?null:a.createElement(K.Provider,{value:h},a.createElement(Y.Provider,{children:t,value:w}))}function eb({children:e,location:t}){return ei(function e(t,n=[]){let r=[];return a.Children.forEach(t,(t,o)=>{if(!a.isValidElement(t))return;let i=[...n,o];if(t.type===a.Fragment)return void r.push.apply(r,e(t.props.children,i));s(t.type===ev,`[${"string"==typeof t.type?t.type:t.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),s(!t.props.index||!t.props.children,"An index route cannot have child routes.");let l={id:t.props.id||i.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,middleware:t.props.middleware,loader:t.props.loader,action:t.props.action,hydrateFallbackElement:t.props.hydrateFallbackElement,HydrateFallback:t.props.HydrateFallback,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:!0===t.props.hasErrorBoundary||null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=e(t.props.children,i)),r.push(l)}),r}(e),t)}(r||(r=n.t(a,2))).useOptimistic,a.memo(function({routes:e,manifest:t,future:n,state:r,isStatic:a,onError:o}){return ei(e,void 0,{manifest:t,state:r,isStatic:a,onError:o,future:n})}),a.Component;var eE="get",eR="application/x-www-form-urlencoded";function ex(e){return"u">typeof HTMLElement&&e instanceof HTMLElement}var eC=null,eS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function eL(e){return null==e||eS.has(e)?e:(c(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${eR}"`),null)}Object.getOwnPropertyNames(Object.prototype).sort().join("\0"),"u">typeof window&&window;function ek(e,t){if(!1===e||null==e)throw Error(t)}function e$(e,t,n,r){let a="string"==typeof e?new URL(e,"u"<typeof window?"server://singlefetch/":window.location.origin):e;return n?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${r}`:a.pathname=`${a.pathname}.${r}`:"/"===a.pathname?a.pathname=`_root.${r}`:t&&"/"===R(a.pathname,t)?a.pathname=`${P(t)}/_root.${r}`:a.pathname=`${P(a.pathname)}.${r}`,a}async function eP(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function eO(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}async function eT(e,t,n){var r;let a,o;return r=(await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await eP(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(eO).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}),a=new Set,o=new Set(void 0),r.reduce((e,t)=>{!1;let n=JSON.stringify(function(e){let t={};for(let n of Object.keys(e).sort())t[n]=e[n];return t}(t));return a.has(n)||(a.add(n),e.push({key:n,link:t})),e},[])}function eF(e,t,n,r,a,o){let i=(e,t)=>!n[t]||e.route.id!==n[t].route.id,l=(e,t)=>
4n[t].pathname!==e.pathname||n[t].route.path?.endsWith("*")&&n[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let u=r.routes[t.route.id];if(!u||!u.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof r)return r}return!0}):[]}function eU(e,t,{includeHydrateFallback:n}={}){return[...new Set(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1))]}function eA(){let e=a.useContext(H);return ek(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function eM(){let e=a.useContext(I);return ek(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}Symbol("SingleFetchRedirect");var eW=a.createContext(void 0);function eN(){let e=a.useContext(eW);return ek(e,"You must render this element inside a <HydratedRouter> element"),e}function ej(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function e_({page:e,...t}){let n=V(),{nonce:r}=eN(),{router:o}=eA(),i=a.useMemo(()=>f(o.routes,e,o.basename),[o.routes,e,o.basename]);return i?(null==t.nonce&&r&&(t={...t,nonce:r}),n)?a.createElement(eD,{page:e,matches:i,...t}):a.createElement(eB,{page:e,matches:i,...t}):null}function eD({page:e,matches:t,...n}){let r=Q(),{future:o}=eN(),{basename:i}=eA(),l=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=e$(e,i,o.v8_trailingSlashAwareDataRequests,"rsc"),a=!1,l=[];for(let e of t)"function"==typeof e.route.shouldRevalidate?a=!0:l.push(e.route.id);return a&&l.length>0&&n.searchParams.set("_routes",l.join(",")),[n.pathname+n.search]},[i,o.v8_trailingSlashAwareDataRequests,e,r,t]);return a.createElement(a.Fragment,null,l.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})))}function eB({page:e,matches:t,...n}){let r=Q(),{future:o,manifest:i,routeModules:l}=eN(),{basename:u}=eA(),{loaderData:s,matches:c}=eM(),h=a.useMemo(()=>eF(e,t,c,i,r,"data"),[e,t,c,i,r]),p=a.useMemo(()=>eF(e,t,c,i,r,"assets"),[e,t,c,i,r]),d=a.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,a=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];t&&t.hasLoader&&(!h.some(t=>t.route.id===e.route.id)&&e.route.id in s&&l[e.route.id]?.shouldRevalidate||t.hasClientLoader?a=!0:n.add(e.route.id))}),0===n.size)return[];let c=e$(e,u,o.v8_trailingSlashAwareDataRequests,"data");return a&&n.size>0&&c.searchParams.set("_routes",t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(",")),[c.pathname+c.search]},[u,o.v8_trailingSlashAwareDataRequests,s,r,i,h,t,e,l]),m=a.useMemo(()=>eU(p,i),[p,i]),f=function(e){let{manifest:t,routeModules:n}=eN(),[r,o]=a.useState([]);return a.useEffect(()=>{let r=!1;return eT(e,t,n).then(e=>{r||o(e)}),()=>{r=!0}},[e,t,n]),r}(p);return a.createElement(a.Fragment,null,d.map(e=>a.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...n})),m.map(e=>a.createElement("link",{key:e,rel:"modulepreload",href:e,...n})),f.map(({key:e,link:t})=>a.createElement("link",{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}eW.displayName="FrameworkContext";a.Component;var eH="u">typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{eH&&(window.__reactRouterVersion="7.18.4")}catch(e){}function eI({basename:e,children:t,useTransitions:n,window:r}){let o=a.useRef();null==o.current&&(o.current=function(e={}){return function(e,t,n={}){let{window:r=document.defaultView,v5Compat:a=!1}=n,o=r.history,c="POP",m=null,f=g();function g(){return(o.state||{idx:null}).idx}function y(){c="POP";let e=g(),t=null==e?null:e-f;f=e,m&&m({action:c,location:w.location,delta:t})}function v(e){return function(e,t,n=!1){let r="http://localhost";e&&(r="null"!==e.location.origin?e.location.origin:e.location.href),s(r,"No window.location.(origin|href) available to create URL");let a="string"==typeof t?t:d(t);return a=a.replace(/ $/,"%20"),!n&&i.test(a)&&(a=r+a),new URL(a,r)}(r,e)}null==f&&(f=0,o.replaceState({...o.state,idx:f},""));let w={get action(){return c},get location(){return e(r,o)},listen(e){if(m)throw Error("A history only accepts one active listener");return r.addEventListener(l,y),m=e,()=>{r.removeEventListener(l,y),m=null}},createHref:e=>t(r,e),createURL:v,encodeLocation(e){let t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c="PUSH";let n=u(e)?e:p(w.location,e,t);let i=h(n,f=g()+1),l=w.createHref(n.mask||n);try{o.pushState(i,"",l)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;r.location.assign(l)}a&&m&&m({action:c,location:w.location,delta:1})},replace:function(e,t){c="REPLACE";let n=u(e)?e:p(w.location,e,t);let r=h(n,f=g()),i=w.createHref(n.mask||n);o.replaceState(r,"",i),a&&m&&m({action:c,location:w.location,delta:0})},go:e=>o.go(e)};return w}(function(e,t){let n=t.state?.masked,{pathname:r,search:a,hash:o}=n||e.location;return p("",{pathname:r,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:d(t)},e)}({window:r,v5Compat:!0}));let c=o.current,[m,f]=a.useState({action:c.action,location:c.location}),g=a.useCallback(e=>{!1===n?f(e):a.startTransition(()=>f(e))},[n]);return a.useLayoutEffect(()=>c.listen(g),[c,g]),a.createElement(ew,{basename:e,children:t,location:m.location,navigationType:m.action,navigator:c,useTransitions:n})}var ez=a.forwardRef(function({onClick:e,discover:t="render",prefetch:n="none",relative:r,reloadDocument:i,replace:l,mask:u,state:c,target:h,to:p,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...y},v){let{basename:w,navigator:b,useTransitions:E}=a.useContext(K),R="string"==typeof p&&o.test(p),x=W(p,w),C=function(e,{relative:t}={}){s(G(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:r}=a.useContext(K),{hash:o,pathname:i,search:l}=eo(e,{relative:t}),u=i;return"/"!==n&&(u="/"===i?n:$([n,i])),r.createHref({pathname:u,search:l,hash:o})}(p=x.to,{relative:r}),S=Q(),k=null;if(u){let e=L(u,[],S.mask?S.mask.pathname:"/",!0);"/"!==w&&(e.pathname="/"===e.pathname?w:$([w,e.pathname])),k=b.createHref(e)}
4let[P,O,T]=function(e,t){let n=a.useContext(eW),[r,o]=a.useState(!1),[i,l]=a.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:c,onMouseLeave:h,onTouchStart:p}=t,d=a.useRef(null);a.useEffect(()=>{if("render"===e&&l(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{l(e.isIntersecting)})},{threshold:.5});return d.current&&e.observe(d.current),()=>{e.disconnect()}}},[e]),a.useEffect(()=>{if(r){let e=setTimeout(()=>{l(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{o(!0)},f=()=>{o(!1),l(!1)};return n?"intent"!==e?[i,d,{}]:[i,d,{onFocus:ej(u,m),onBlur:ej(s,f),onMouseEnter:ej(c,m),onMouseLeave:ej(h,f),onTouchStart:ej(p,m)}]:[!1,d,{}]}(n,y),F=function(e,{target:t,replace:n,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:u,defaultShouldRevalidate:s,useTransitions:c}={}){let h=en(),p=Q(),m=eo(e,{relative:l});return a.useCallback(f=>{if(0===f.button&&(!t||"_self"===t)&&!(f.metaKey||f.altKey||f.ctrlKey||f.shiftKey)){f.preventDefault();let t=void 0!==n?n:d(p)===d(m),g=()=>h(e,{replace:t,mask:r,state:o,preventScrollReset:i,relative:l,viewTransition:u,defaultShouldRevalidate:s});c?a.startTransition(()=>g()):g()}},[p,h,m,n,r,o,t,e,i,l,u,s,c])}(p,{replace:l,mask:u,state:c,target:h,preventScrollReset:m,relative:r,viewTransition:f,defaultShouldRevalidate:g,useTransitions:E}),U=!(x.isExternal||i),A=a.createElement("a",{...y,...T,href:(U?k:void 0)||x.absoluteURL||C,onClick:U?function(t){e&&e(t),t.defaultPrevented||F(t)}:e,ref:function(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}(v,O),target:h,"data-discover":R||"render"!==t?void 0:"true"});return P&&!R?a.createElement(a.Fragment,null,A,a.createElement(e_,{page:C})):A});ez.displayName="Link",a.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:n="",end:r=!1,style:o,to:i,viewTransition:l,children:u,...c},h){let p,d=eo(i,{relative:c.relative}),m=Q(),f=a.useContext(I),{navigator:g,basename:y}=a.useContext(K),v=null!=f&&function(e,{relative:t}={}){let n=a.useContext(J);s(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=eV("useViewTransitionState"),o=eo(e,{relative:t});if(!n.isTransitioning)return!1;let i=R(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=R(n.nextLocation.pathname,r)||n.nextLocation.pathname;return null!=w(o.pathname,l)||null!=w(o.pathname,i)}(d)&&!0===l,b=g.encodeLocation?g.encodeLocation(d).pathname:d.pathname,E=m.pathname,x=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(E=E.toLowerCase(),x=x?x.toLowerCase():null,b=b.toLowerCase()),x&&y&&(x=R(x,y)||x);let C="/"!==b&&b.endsWith("/")?b.length-1:b.length,S=E===b||!r&&E.startsWith(b)&&"/"===E.charAt(C),L=null!=x&&(x===b||!r&&x.startsWith(b)&&"/"===x.charAt(b.length)),k={isActive:S,isPending:L,isTransitioning:v},$=S?e:void 0;p="function"==typeof n?n(k):[n,S?"active":null,L?"pending":null,v?"transitioning":null].filter(Boolean).join(" ");let P="function"==typeof o?o(k):o;return a.createElement(ez,{...c,"aria-current":$,className:p,ref:h,style:P,to:i,viewTransition:l},"function"==typeof u?u(k):u)}).displayName="NavLink",a.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:l,method:u=eE,action:c,onSubmit:h,relative:p,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g,...y},v)=>{let{useTransitions:w}=a.useContext(K),b=function(){let{router:e}=eV("useSubmit"),{basename:t}=a.useContext(K),n=em("useRouteId"),r=e.fetch,o=e.navigate;return a.useCallback(async(e,a={})=>{let{action:i,method:l,encType:u,formData:s,body:c}=function(e,t){let n,r,a,o,i;if(ex(e)&&"form"===e.tagName.toLowerCase()){let i=e.getAttribute("action");r=i?R(i,t):null,n=e.getAttribute("method")||eE,a=eL(e.getAttribute("enctype"))||eR,o=new FormData(e)}else if(ex(e)&&"button"===e.tagName.toLowerCase()||ex(e)&&"input"===e.tagName.toLowerCase()&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||i.getAttribute("action");if(r=l?R(l,t):null,n=e.getAttribute("formmethod")||i.getAttribute("method")||eE,a=eL(e.getAttribute("formenctype"))||eL(i.getAttribute("enctype"))||eR,o=new FormData(i,e),!function(){if(null===eC)try{new FormData(document.createElement("form"),0),eC=!1}catch(e){eC=!0}return eC}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?`${t}.`:"";o.append(`${e}x`,"0"),o.append(`${e}y`,"0")}
4else t&&o.append(t,r)}}else if(ex(e))throw Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');else n=eE,r=null,a=eR,i=e;return o&&"text/plain"===a&&(i=o,o=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:o,body:i}}(e,t);if(!1===a.navigate){let e=a.fetcherKey||`__${String(++eJ)}__`;await r(e,n,a.action||i,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:s,body:c,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else await o(a.action||i,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:s,body:c,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,o,t,n])}(),E=function(e,{relative:t}={}){let{basename:n}=a.useContext(K),r=a.useContext(q);s(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),i={...eo(e||".",{relative:t})},l=Q();if(null==e){i.search=l.search;let e=new URLSearchParams(i.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();i.search=n?`?${n}`:""}}return(!e||"."===e)&&o.route.index&&(i.search=i.search?i.search.replace(/^\?/,"?index&"):"?index"),"/"!==n&&(i.pathname="/"===i.pathname?n:$([n,i.pathname])),d(i)}(c,{relative:p}),x="get"===u.toLowerCase()?"get":"post",C="string"==typeof c&&o.test(c);return a.createElement("form",{ref:v,method:x,action:E,onSubmit:r?h:e=>{if(h&&h(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,o=r?.getAttribute("formmethod")||u,s=()=>b(r||e.currentTarget,{fetcherKey:t,method:o,navigate:n,replace:i,state:l,relative:p,preventScrollReset:m,viewTransition:f,defaultShouldRevalidate:g});w&&!1!==n?a.startTransition(()=>s()):s()},...y,"data-discover":C||"render"!==e?void 0:"true"})}).displayName="Form";function eV(e){var t;let n=a.useContext(H);return s(n,(t=e,`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`)),n}var eJ=0}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.