Files
autoglue/internal/web/dist/assets/react-B7S5QDrv.js
2025-11-17 19:57:04 +00:00

5 lines
44 KiB
JavaScript

function nt(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const o in n)if(o!=="default"&&!(o in e)){const u=Object.getOwnPropertyDescriptor(n,o);u&&Object.defineProperty(e,o,u.get?u:{enumerable:!0,get:()=>n[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Ar=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ne(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var se={exports:{}},R={};var xe;function ot(){if(xe)return R;xe=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),s=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),a=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function E(i){return i===null||typeof i!="object"?null:(i=g&&i[g]||i["@@iterator"],typeof i=="function"?i:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,y={};function m(i,h,_){this.props=i,this.context=h,this.refs=y,this.updater=_||C}m.prototype.isReactComponent={},m.prototype.setState=function(i,h){if(typeof i!="object"&&typeof i!="function"&&i!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,i,h,"setState")},m.prototype.forceUpdate=function(i){this.updater.enqueueForceUpdate(this,i,"forceUpdate")};function v(){}v.prototype=m.prototype;function S(i,h,_){this.props=i,this.context=h,this.refs=y,this.updater=_||C}var $=S.prototype=new v;$.constructor=S,x($,m.prototype),$.isPureReactComponent=!0;var N=Array.isArray;function B(){}var P={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function A(i,h,_){var w=_.ref;return{$$typeof:e,type:i,key:h,ref:w!==void 0?w:null,props:_}}function W(i,h){return A(i.type,h,i.props)}function q(i){return typeof i=="object"&&i!==null&&i.$$typeof===e}function Qe(i){var h={"=":"=0",":":"=2"};return"$"+i.replace(/[=:]/g,function(_){return h[_]})}var Ce=/\/+/g;function le(i,h){return typeof i=="object"&&i!==null&&i.key!=null?Qe(""+i.key):h.toString(36)}function Ze(i){switch(i.status){case"fulfilled":return i.value;case"rejected":throw i.reason;default:switch(typeof i.status=="string"?i.then(B,B):(i.status="pending",i.then(function(h){i.status==="pending"&&(i.status="fulfilled",i.value=h)},function(h){i.status==="pending"&&(i.status="rejected",i.reason=h)})),i.status){case"fulfilled":return i.value;case"rejected":throw i.reason}}throw i}function K(i,h,_,w,b){var T=typeof i;(T==="undefined"||T==="boolean")&&(i=null);var L=!1;if(i===null)L=!0;else switch(T){case"bigint":case"string":case"number":L=!0;break;case"object":switch(i.$$typeof){case e:case t:L=!0;break;case f:return L=i._init,K(L(i._payload),h,_,w,b)}}if(L)return b=b(i),L=w===""?"."+le(i,0):w,N(b)?(_="",L!=null&&(_=L.replace(Ce,"$&/")+"/"),K(b,h,_,"",function(rt){return rt})):b!=null&&(q(b)&&(b=W(b,_+(b.key==null||i&&i.key===b.key?"":(""+b.key).replace(Ce,"$&/")+"/")+L)),h.push(b)),1;L=0;var U=w===""?".":w+":";if(N(i))for(var D=0;D<i.length;D++)w=i[D],T=U+le(w,D),L+=K(w,h,_,T,b);else if(D=E(i),typeof D=="function")for(i=D.call(i),D=0;!(w=i.next()).done;)w=w.value,T=U+le(w,D++),L+=K(w,h,_,T,b);else if(T==="object"){if(typeof i.then=="function")return K(Ze(i),h,_,w,b);throw h=String(i),Error("Objects are not valid as a React child (found: "+(h==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":h)+"). If you meant to render a collection of children, use an array instead.")}return L}function te(i,h,_){if(i==null)return i;var w=[],b=0;return K(i,w,"","",function(T){return h.call(_,T,b++)}),w}function et(i){if(i._status===-1){var h=i._result;h=h(),h.then(function(_){(i._status===0||i._status===-1)&&(i._status=1,i._result=_)},function(_){(i._status===0||i._status===-1)&&(i._status=2,i._result=_)}),i._status===-1&&(i._status=0,i._result=h)}if(i._status===1)return i._result.default;throw i._result}var _e=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var h=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(h))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},tt={map:te,forEach:function(i,h,_){te(i,function(){h.apply(this,arguments)},_)},count:function(i){var h=0;return te(i,function(){h++}),h},toArray:function(i){return te(i,function(h){return h})||[]},only:function(i){if(!q(i))throw Error("React.Children.only expected to receive a single React element child.");return i}};return R.Activity=p,R.Children=tt,R.Component=m,R.Fragment=r,R.Profiler=o,R.PureComponent=S,R.StrictMode=n,R.Suspense=l,R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,R.__COMPILER_RUNTIME={__proto__:null,c:function(i){return P.H.useMemoCache(i)}},R.cache=function(i){return function(){return i.apply(null,arguments)}},R.cacheSignal=function(){return null},R.cloneElement=function(i,h,_){if(i==null)throw Error("The argument must be a React element, but you passed "+i+".");var w=x({},i.props),b=i.key;if(h!=null)for(T in h.key!==void 0&&(b=""+h.key),h)!z.call(h,T)||T==="key"||T==="__self"||T==="__source"||T==="ref"&&h.ref===void 0||(w[T]=h[T]);var T=arguments.length-2;if(T===1)w.children=_;else if(1<T){for(var L=Array(T),U=0;U<T;U++)L[U]=arguments[U+2];w.children=L}return A(i.type,b,w)},R.createContext=function(i){return i={$$typeof:s,_currentValue:i,_currentValue2:i,_threadCount:0,Provider:null,Consumer:null},i.Provider=i,i.Consumer={$$typeof:u,_context:i},i},R.createElement=function(i,h,_){var w,b={},T=null;if(h!=null)for(w in h.key!==void 0&&(T=""+h.key),h)z.call(h,w)&&w!=="key"&&w!=="__self"&&w!=="__source"&&(b[w]=h[w]);var L=arguments.length-2;if(L===1)b.children=_;else if(1<L){for(var U=Array(L),D=0;D<L;D++)U[D]=arguments[D+2];b.children=U}if(i&&i.defaultProps)for(w in L=i.defaultProps,L)b[w]===void 0&&(b[w]=L[w]);return A(i,T,b)},R.createRef=function(){return{current:null}},R.forwardRef=function(i){return{$$typeof:d,render:i}},R.isValidElement=q,R.lazy=function(i){return{$$typeof:f,_payload:{_status:-1,_result:i},_init:et}},R.memo=function(i,h){return{$$typeof:a,type:i,compare:h===void 0?null:h}},R.startTransition=function(i){var h=P.T,_={};P.T=_;try{var w=i(),b=P.S;b!==null&&b(_,w),typeof w=="object"&&w!==null&&typeof w.then=="function"&&w.then(B,_e)}catch(T){_e(T)}finally{h!==null&&_.types!==null&&(h.types=_.types),P.T=h}},R.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},R.use=function(i){return P.H.use(i)},R.useActionState=function(i,h,_){return P.H.useActionState(i,h,_)},R.useCallback=function(i,h){return P.H.useCallback(i,h)},R.useContext=function(i){return P.H.useContext(i)},R.useDebugValue=function(){},R.useDeferredValue=function(i,h){return P.H.useDeferredValue(i,h)},R.useEffect=function(i,h){return P.H.useEffect(i,h)},R.useEffectEvent=function(i){return P.H.useEffectEvent(i)},R.useId=function(){return P.H.useId()},R.useImperativeHandle=function(i,h,_){return P.H.useImperativeHandle(i,h,_)},R.useInsertionEffect=function(i,h){return P.H.useInsertionEffect(i,h)},R.useLayoutEffect=function(i,h){return P.H.useLayoutEffect(i,h)},R.useMemo=function(i,h){return P.H.useMemo(i,h)},R.useOptimistic=function(i,h){return P.H.useOptimistic(i,h)},R.useReducer=function(i,h,_){return P.H.useReducer(i,h,_)},R.useRef=function(i){return P.H.useRef(i)},R.useState=function(i){return P.H.useState(i)},R.useSyncExternalStore=function(i,h,_){return P.H.useSyncExternalStore(i,h,_)},R.useTransition=function(){return P.H.useTransition()},R.version="19.2.0",R}var Se;function De(){return Se||(Se=1,se.exports=ot()),se.exports}var c=De();const at=Ne(c),Nr=nt({__proto__:null,default:at},[c]);var ce={exports:{}},k={};var Pe;function it(){if(Pe)return k;Pe=1;var e=De();function t(l){var a="https://react.dev/errors/"+l;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)a+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+l+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(l,a,f){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:l,containerInfo:a,implementation:f}}var s=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(l,a){if(l==="font")return"";if(typeof a=="string")return a==="use-credentials"?a:""}return k.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,k.createPortal=function(l,a){var f=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)throw Error(t(299));return u(l,a,null,f)},k.flushSync=function(l){var a=s.T,f=n.p;try{if(s.T=null,n.p=2,l)return l()}finally{s.T=a,n.p=f,n.d.f()}},k.preconnect=function(l,a){typeof l=="string"&&(a?(a=a.crossOrigin,a=typeof a=="string"?a==="use-credentials"?a:"":void 0):a=null,n.d.C(l,a))},k.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},k.preinit=function(l,a){if(typeof l=="string"&&a&&typeof a.as=="string"){var f=a.as,p=d(f,a.crossOrigin),g=typeof a.integrity=="string"?a.integrity:void 0,E=typeof a.fetchPriority=="string"?a.fetchPriority:void 0;f==="style"?n.d.S(l,typeof a.precedence=="string"?a.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:E}):f==="script"&&n.d.X(l,{crossOrigin:p,integrity:g,fetchPriority:E,nonce:typeof a.nonce=="string"?a.nonce:void 0})}},k.preinitModule=function(l,a){if(typeof l=="string")if(typeof a=="object"&&a!==null){if(a.as==null||a.as==="script"){var f=d(a.as,a.crossOrigin);n.d.M(l,{crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0})}}else a==null&&n.d.M(l)},k.preload=function(l,a){if(typeof l=="string"&&typeof a=="object"&&a!==null&&typeof a.as=="string"){var f=a.as,p=d(f,a.crossOrigin);n.d.L(l,f,{crossOrigin:p,integrity:typeof a.integrity=="string"?a.integrity:void 0,nonce:typeof a.nonce=="string"?a.nonce:void 0,type:typeof a.type=="string"?a.type:void 0,fetchPriority:typeof a.fetchPriority=="string"?a.fetchPriority:void 0,referrerPolicy:typeof a.referrerPolicy=="string"?a.referrerPolicy:void 0,imageSrcSet:typeof a.imageSrcSet=="string"?a.imageSrcSet:void 0,imageSizes:typeof a.imageSizes=="string"?a.imageSizes:void 0,media:typeof a.media=="string"?a.media:void 0})}},k.preloadModule=function(l,a){if(typeof l=="string")if(a){var f=d(a.as,a.crossOrigin);n.d.m(l,{as:typeof a.as=="string"&&a.as!=="script"?a.as:void 0,crossOrigin:f,integrity:typeof a.integrity=="string"?a.integrity:void 0})}else n.d.m(l)},k.requestFormReset=function(l){n.d.r(l)},k.unstable_batchedUpdates=function(l,a){return l(a)},k.useFormState=function(l,a,f){return s.H.useFormState(l,a,f)},k.useFormStatus=function(){return s.H.useHostTransitionStatus()},k.version="19.2.0",k}var be;function ut(){if(be)return ce.exports;be=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ce.exports=it(),ce.exports}var lt=ut();const Dr=Ne(lt);var Te="popstate";function st(e={}){function t(n,o){let{pathname:u,search:s,hash:d}=n.location;return pe("",{pathname:u,search:s,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function r(n,o){return typeof o=="string"?o:Q(o)}return ft(t,r,null,e)}function O(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function M(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ct(){return Math.random().toString(36).substring(2,10)}function Le(e,t){return{usr:e.state,key:e.key,idx:t}}function pe(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?V(t):t,state:r,key:t&&t.key||n||ct()}}function Q({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function V(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ft(e,t,r,n={}){let{window:o=document.defaultView,v5Compat:u=!1}=n,s=o.history,d="POP",l=null,a=f();a==null&&(a=0,s.replaceState({...s.state,idx:a},""));function f(){return(s.state||{idx:null}).idx}function p(){d="POP";let y=f(),m=y==null?null:y-a;a=y,l&&l({action:d,location:x.location,delta:m})}function g(y,m){d="PUSH";let v=pe(x.location,y,m);a=f()+1;let S=Le(v,a),$=x.createHref(v);try{s.pushState(S,"",$)}catch(N){if(N instanceof DOMException&&N.name==="DataCloneError")throw N;o.location.assign($)}u&&l&&l({action:d,location:x.location,delta:1})}function E(y,m){d="REPLACE";let v=pe(x.location,y,m);a=f();let S=Le(v,a),$=x.createHref(v);s.replaceState(S,"",$),u&&l&&l({action:d,location:x.location,delta:0})}function C(y){return dt(y)}let x={get action(){return d},get location(){return e(o,s)},listen(y){if(l)throw new Error("A history only accepts one active listener");return o.addEventListener(Te,p),l=y,()=>{o.removeEventListener(Te,p),l=null}},createHref(y){return t(o,y)},createURL:C,encodeLocation(y){let m=C(y);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:g,replace:E,go(y){return s.go(y)}};return x}function dt(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),O(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Q(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}function Me(e,t,r="/"){return pt(e,t,r,!1)}function pt(e,t,r,n){let o=typeof t=="string"?V(t):t,u=j(o.pathname||"/",r);if(u==null)return null;let s=Ie(e);ht(s);let d=null;for(let l=0;d==null&&l<s.length;++l){let a=St(u);d=_t(s[l],a,n)}return d}function Ie(e,t=[],r=[],n="",o=!1){let u=(s,d,l=o,a)=>{let f={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:d,route:s};if(f.relativePath.startsWith("/")){if(!f.relativePath.startsWith(n)&&l)return;O(f.relativePath.startsWith(n),`Absolute route path "${f.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),f.relativePath=f.relativePath.slice(n.length)}let p=F([n,f.relativePath]),g=r.concat(f);s.children&&s.children.length>0&&(O(s.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),Ie(s.children,t,g,p,l)),!(s.path==null&&!s.index)&&t.push({path:p,score:wt(p,s.index),routesMeta:g})};return e.forEach((s,d)=>{if(s.path===""||!s.path?.includes("?"))u(s,d);else for(let l of He(s.path))u(s,d,!0,l)}),t}function He(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,o=r.endsWith("?"),u=r.replace(/\?$/,"");if(n.length===0)return o?[u,""]:[u];let s=He(n.join("/")),d=[];return d.push(...s.map(l=>l===""?u:[u,l].join("/"))),o&&d.push(...s),d.map(l=>e.startsWith("/")&&l===""?"/":l)}function ht(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:Ct(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var mt=/^:[\w-]+$/,yt=3,gt=2,vt=1,Et=10,Rt=-2,Oe=e=>e==="*";function wt(e,t){let r=e.split("/"),n=r.length;return r.some(Oe)&&(n+=Rt),t&&(n+=gt),r.filter(o=>!Oe(o)).reduce((o,u)=>o+(mt.test(u)?yt:u===""?vt:Et),n)}function Ct(e,t){return e.length===t.length&&e.slice(0,-1).every((n,o)=>n===t[o])?e[e.length-1]-t[t.length-1]:0}function _t(e,t,r=!1){let{routesMeta:n}=e,o={},u="/",s=[];for(let d=0;d<n.length;++d){let l=n[d],a=d===n.length-1,f=u==="/"?t:t.slice(u.length)||"/",p=ae({path:l.relativePath,caseSensitive:l.caseSensitive,end:a},f),g=l.route;if(!p&&a&&r&&!n[n.length-1].route.index&&(p=ae({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},f)),!p)return null;Object.assign(o,p.params),s.push({params:o,pathname:F([u,p.pathname]),pathnameBase:Ot(F([u,p.pathnameBase])),route:g}),p.pathnameBase!=="/"&&(u=F([u,p.pathnameBase]))}return s}function ae(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=xt(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let u=o[0],s=u.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:n.reduce((a,{paramName:f,isOptional:p},g)=>{if(f==="*"){let C=d[g]||"";s=u.slice(0,u.length-C.length).replace(/(.)\/+$/,"$1")}const E=d[g];return p&&!E?a[f]=void 0:a[f]=(E||"").replace(/%2F/g,"/"),a},{}),pathname:u,pathnameBase:s,pattern:e}}function xt(e,t=!1,r=!0){M(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,d,l)=>(n.push({paramName:d,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}function St(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return M(!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}}function j(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}var Pt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,bt=e=>Pt.test(e);function Tt(e,t="/"){let{pathname:r,search:n="",hash:o=""}=typeof e=="string"?V(e):e,u;if(r)if(bt(r))u=r;else{if(r.includes("//")){let s=r;r=r.replace(/\/\/+/g,"/"),M(!1,`Pathnames cannot have embedded double slashes - normalizing ${s} -> ${r}`)}r.startsWith("/")?u=ke(r.substring(1),"/"):u=ke(r,t)}else u=t;return{pathname:u,search:kt(n),hash:$t(o)}}function ke(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function fe(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Lt(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function me(e){let t=Lt(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function ye(e,t,r,n=!1){let o;typeof e=="string"?o=V(e):(o={...e},O(!o.pathname||!o.pathname.includes("?"),fe("?","pathname","search",o)),O(!o.pathname||!o.pathname.includes("#"),fe("#","pathname","hash",o)),O(!o.search||!o.search.includes("#"),fe("#","search","hash",o)));let u=e===""||o.pathname==="",s=u?"/":o.pathname,d;if(s==null)d=r;else{let p=t.length-1;if(!n&&s.startsWith("..")){let g=s.split("/");for(;g[0]==="..";)g.shift(),p-=1;o.pathname=g.join("/")}d=p>=0?t[p]:"/"}let l=Tt(o,d),a=s&&s!=="/"&&s.endsWith("/"),f=(u||s===".")&&r.endsWith("/");return!l.pathname.endsWith("/")&&(a||f)&&(l.pathname+="/"),l}var F=e=>e.join("/").replace(/\/\/+/g,"/"),Ot=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),kt=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,$t=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function At(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Ue=["POST","PUT","PATCH","DELETE"];new Set(Ue);var Nt=["GET",...Ue];new Set(Nt);var G=c.createContext(null);G.displayName="DataRouter";var ie=c.createContext(null);ie.displayName="DataRouterState";c.createContext(!1);var Fe=c.createContext({isTransitioning:!1});Fe.displayName="ViewTransition";var Dt=c.createContext(new Map);Dt.displayName="Fetchers";var Mt=c.createContext(null);Mt.displayName="Await";var I=c.createContext(null);I.displayName="Navigation";var Z=c.createContext(null);Z.displayName="Location";var H=c.createContext({outlet:null,matches:[],isDataRoute:!1});H.displayName="Route";var ge=c.createContext(null);ge.displayName="RouteError";function It(e,{relative:t}={}){O(J(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=c.useContext(I),{hash:o,pathname:u,search:s}=ee(e,{relative:t}),d=u;return r!=="/"&&(d=u==="/"?r:F([r,u])),n.createHref({pathname:d,search:s,hash:o})}function J(){return c.useContext(Z)!=null}function Y(){return O(J(),"useLocation() may be used only in the context of a <Router> component."),c.useContext(Z).location}var je="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Be(e){c.useContext(I).static||c.useLayoutEffect(e)}function We(){let{isDataRoute:e}=c.useContext(H);return e?Qt():Ht()}function Ht(){O(J(),"useNavigate() may be used only in the context of a <Router> component.");let e=c.useContext(G),{basename:t,navigator:r}=c.useContext(I),{matches:n}=c.useContext(H),{pathname:o}=Y(),u=JSON.stringify(me(n)),s=c.useRef(!1);return Be(()=>{s.current=!0}),c.useCallback((l,a={})=>{if(M(s.current,je),!s.current)return;if(typeof l=="number"){r.go(l);return}let f=ye(l,JSON.parse(u),o,a.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:F([t,f.pathname])),(a.replace?r.replace:r.push)(f,a.state,a)},[t,r,u,o,e])}var Ut=c.createContext(null);function Ft(e){let t=c.useContext(H).outlet;return c.useMemo(()=>t&&c.createElement(Ut.Provider,{value:e},t),[t,e])}function ee(e,{relative:t}={}){let{matches:r}=c.useContext(H),{pathname:n}=Y(),o=JSON.stringify(me(r));return c.useMemo(()=>ye(e,JSON.parse(o),n,t==="path"),[e,o,n,t])}function jt(e,t){return Ye(e,t)}function Ye(e,t,r,n,o){O(J(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:u}=c.useContext(I),{matches:s}=c.useContext(H),d=s[s.length-1],l=d?d.params:{},a=d?d.pathname:"/",f=d?d.pathnameBase:"/",p=d&&d.route;{let v=p&&p.path||"";ze(a,!p||v.endsWith("*")||v.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${a}" (under <Route path="${v}">) 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.
Please change the parent <Route path="${v}"> to <Route path="${v==="/"?"*":`${v}/*`}">.`)}let g=Y(),E;if(t){let v=typeof t=="string"?V(t):t;O(f==="/"||v.pathname?.startsWith(f),`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 "${f}" but pathname "${v.pathname}" was given in the \`location\` prop.`),E=v}else E=g;let C=E.pathname||"/",x=C;if(f!=="/"){let v=f.replace(/^\//,"").split("/");x="/"+C.replace(/^\//,"").split("/").slice(v.length).join("/")}let y=Me(e,{pathname:x});M(p||y!=null,`No routes matched location "${E.pathname}${E.search}${E.hash}" `),M(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${E.pathname}${E.search}${E.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 m=qt(y&&y.map(v=>Object.assign({},v,{params:Object.assign({},l,v.params),pathname:F([f,u.encodeLocation?u.encodeLocation(v.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?f:F([f,u.encodeLocation?u.encodeLocation(v.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:v.pathnameBase])})),s,r,n,o);return t&&m?c.createElement(Z.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...E},navigationType:"POP"}},m):m}function Bt(){let e=Xt(),t=At(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:n},u={padding:"2px 4px",backgroundColor:n},s=null;return console.error("Error handled by React Router default ErrorBoundary:",e),s=c.createElement(c.Fragment,null,c.createElement("p",null,"💿 Hey developer 👋"),c.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",c.createElement("code",{style:u},"ErrorBoundary")," or"," ",c.createElement("code",{style:u},"errorElement")," prop on your route.")),c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),r?c.createElement("pre",{style:o},r):null,s)}var Wt=c.createElement(Bt,null),Yt=class extends c.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||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?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(){return this.state.error!==void 0?c.createElement(H.Provider,{value:this.props.routeContext},c.createElement(ge.Provider,{value:this.state.error,children:this.props.component})):this.props.children}};function zt({routeContext:e,match:t,children:r}){let n=c.useContext(G);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),c.createElement(H.Provider,{value:e},r)}function qt(e,t=[],r=null,n=null,o=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let u=e,s=r?.errors;if(s!=null){let f=u.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);O(f>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),u=u.slice(0,Math.min(u.length,f+1))}let d=!1,l=-1;if(r)for(let f=0;f<u.length;f++){let p=u[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(l=f),p.route.id){let{loaderData:g,errors:E}=r,C=p.route.loader&&!g.hasOwnProperty(p.route.id)&&(!E||E[p.route.id]===void 0);if(p.route.lazy||C){d=!0,l>=0?u=u.slice(0,l+1):u=[u[0]];break}}}let a=r&&n?(f,p)=>{n(f,{location:r.location,params:r.matches?.[0]?.params??{},errorInfo:p})}:void 0;return u.reduceRight((f,p,g)=>{let E,C=!1,x=null,y=null;r&&(E=s&&p.route.id?s[p.route.id]:void 0,x=p.route.errorElement||Wt,d&&(l<0&&g===0?(ze("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,y=null):l===g&&(C=!0,y=p.route.hydrateFallbackElement||null)));let m=t.concat(u.slice(0,g+1)),v=()=>{let S;return E?S=x:C?S=y:p.route.Component?S=c.createElement(p.route.Component,null):p.route.element?S=p.route.element:S=f,c.createElement(zt,{match:p,routeContext:{outlet:f,matches:m,isDataRoute:r!=null},children:S})};return r&&(p.route.ErrorBoundary||p.route.errorElement||g===0)?c.createElement(Yt,{location:r.location,revalidation:r.revalidation,component:x,error:E,children:v(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:a}):v()},null)}function ve(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kt(e){let t=c.useContext(G);return O(t,ve(e)),t}function Vt(e){let t=c.useContext(ie);return O(t,ve(e)),t}function Gt(e){let t=c.useContext(H);return O(t,ve(e)),t}function Ee(e){let t=Gt(e),r=t.matches[t.matches.length-1];return O(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Jt(){return Ee("useRouteId")}function Xt(){let e=c.useContext(ge),t=Vt("useRouteError"),r=Ee("useRouteError");return e!==void 0?e:t.errors?.[r]}function Qt(){let{router:e}=Kt("useNavigate"),t=Ee("useNavigate"),r=c.useRef(!1);return Be(()=>{r.current=!0}),c.useCallback(async(o,u={})=>{M(r.current,je),r.current&&(typeof o=="number"?e.navigate(o):await e.navigate(o,{fromRouteId:t,...u}))},[e,t])}var $e={};function ze(e,t,r){!t&&!$e[e]&&($e[e]=!0,M(!1,r))}c.memo(Zt);function Zt({routes:e,future:t,state:r,unstable_onError:n}){return Ye(e,void 0,r,n,t)}function Mr({to:e,replace:t,state:r,relative:n}){O(J(),"<Navigate> may be used only in the context of a <Router> component.");let{static:o}=c.useContext(I);M(!o,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:u}=c.useContext(H),{pathname:s}=Y(),d=We(),l=ye(e,me(u),s,n==="path"),a=JSON.stringify(l);return c.useEffect(()=>{d(JSON.parse(a),{replace:t,state:r,relative:n})},[d,a,n,t,r]),null}function Ir(e){return Ft(e.context)}function er(e){O(!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 tr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:o,static:u=!1}){O(!J(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),d=c.useMemo(()=>({basename:s,navigator:o,static:u,future:{}}),[s,o,u]);typeof r=="string"&&(r=V(r));let{pathname:l="/",search:a="",hash:f="",state:p=null,key:g="default"}=r,E=c.useMemo(()=>{let C=j(l,s);return C==null?null:{location:{pathname:C,search:a,hash:f,state:p,key:g},navigationType:n}},[s,l,a,f,p,g,n]);return M(E!=null,`<Router basename="${s}"> is not able to match the URL "${l}${a}${f}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:c.createElement(I.Provider,{value:d},c.createElement(Z.Provider,{children:t,value:E}))}function Hr({children:e,location:t}){return jt(he(e),t)}function he(e,t=[]){let r=[];return c.Children.forEach(e,(n,o)=>{if(!c.isValidElement(n))return;let u=[...t,o];if(n.type===c.Fragment){r.push.apply(r,he(n.props.children,u));return}O(n.type===er,`[${typeof n.type=="string"?n.type:n.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),O(!n.props.index||!n.props.children,"An index route cannot have child routes.");let s={id:n.props.id||u.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,middleware:n.props.middleware,loader:n.props.loader,action:n.props.action,hydrateFallbackElement:n.props.hydrateFallbackElement,HydrateFallback:n.props.HydrateFallback,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.hasErrorBoundary===!0||n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=he(n.props.children,u)),r.push(s)}),r}var ne="get",oe="application/x-www-form-urlencoded";function ue(e){return e!=null&&typeof e.tagName=="string"}function rr(e){return ue(e)&&e.tagName.toLowerCase()==="button"}function nr(e){return ue(e)&&e.tagName.toLowerCase()==="form"}function or(e){return ue(e)&&e.tagName.toLowerCase()==="input"}function ar(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ir(e,t){return e.button===0&&(!t||t==="_self")&&!ar(e)}var re=null;function ur(){if(re===null)try{new FormData(document.createElement("form"),0),re=!1}catch{re=!0}return re}var lr=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function de(e){return e!=null&&!lr.has(e)?(M(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${oe}"`),null):e}function sr(e,t){let r,n,o,u,s;if(nr(e)){let d=e.getAttribute("action");n=d?j(d,t):null,r=e.getAttribute("method")||ne,o=de(e.getAttribute("enctype"))||oe,u=new FormData(e)}else if(rr(e)||or(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||d.getAttribute("action");if(n=l?j(l,t):null,r=e.getAttribute("formmethod")||d.getAttribute("method")||ne,o=de(e.getAttribute("formenctype"))||de(d.getAttribute("enctype"))||oe,u=new FormData(d,e),!ur()){let{name:a,type:f,value:p}=e;if(f==="image"){let g=a?`${a}.`:"";u.append(`${g}x`,"0"),u.append(`${g}y`,"0")}else a&&u.append(a,p)}}else{if(ue(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=ne,n=null,o=oe,s=e}return u&&o==="text/plain"&&(s=u,u=void 0),{action:n,method:r.toLowerCase(),encType:o,formData:u,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Re(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cr(e,t,r){let n=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n.pathname==="/"?n.pathname=`_root.${r}`:t&&j(n.pathname,t)==="/"?n.pathname=`${t.replace(/\/$/,"")}/_root.${r}`:n.pathname=`${n.pathname.replace(/\/$/,"")}.${r}`,n}async function fr(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function dr(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function pr(e,t,r){let n=await Promise.all(e.map(async o=>{let u=t.routes[o.route.id];if(u){let s=await fr(u,r);return s.links?s.links():[]}return[]}));return gr(n.flat(1).filter(dr).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ae(e,t,r,n,o,u){let s=(l,a)=>r[a]?l.route.id!==r[a].route.id:!0,d=(l,a)=>r[a].pathname!==l.pathname||r[a].route.path?.endsWith("*")&&r[a].params["*"]!==l.params["*"];return u==="assets"?t.filter((l,a)=>s(l,a)||d(l,a)):u==="data"?t.filter((l,a)=>{let f=n.routes[l.route.id];if(!f||!f.hasLoader)return!1;if(s(l,a)||d(l,a))return!0;if(l.route.shouldRevalidate){let p=l.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:l.params,defaultShouldRevalidate:!0});if(typeof p=="boolean")return p}return!0}):[]}function hr(e,t,{includeHydrateFallback:r}={}){return mr(e.map(n=>{let o=t.routes[n.route.id];if(!o)return[];let u=[o.module];return o.clientActionModule&&(u=u.concat(o.clientActionModule)),o.clientLoaderModule&&(u=u.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(u=u.concat(o.hydrateFallbackModule)),o.imports&&(u=u.concat(o.imports)),u}).flat(1))}function mr(e){return[...new Set(e)]}function yr(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function gr(e,t){let r=new Set;return new Set(t),e.reduce((n,o)=>{let u=JSON.stringify(yr(o));return r.has(u)||(r.add(u),n.push({key:u,link:o})),n},[])}function qe(){let e=c.useContext(G);return Re(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function vr(){let e=c.useContext(ie);return Re(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var we=c.createContext(void 0);we.displayName="FrameworkContext";function Ke(){let e=c.useContext(we);return Re(e,"You must render this element inside a <HydratedRouter> element"),e}function Er(e,t){let r=c.useContext(we),[n,o]=c.useState(!1),[u,s]=c.useState(!1),{onFocus:d,onBlur:l,onMouseEnter:a,onMouseLeave:f,onTouchStart:p}=t,g=c.useRef(null);c.useEffect(()=>{if(e==="render"&&s(!0),e==="viewport"){let x=m=>{m.forEach(v=>{s(v.isIntersecting)})},y=new IntersectionObserver(x,{threshold:.5});return g.current&&y.observe(g.current),()=>{y.disconnect()}}},[e]),c.useEffect(()=>{if(n){let x=setTimeout(()=>{s(!0)},100);return()=>{clearTimeout(x)}}},[n]);let E=()=>{o(!0)},C=()=>{o(!1),s(!1)};return r?e!=="intent"?[u,g,{}]:[u,g,{onFocus:X(d,E),onBlur:X(l,C),onMouseEnter:X(a,E),onMouseLeave:X(f,C),onTouchStart:X(p,E)}]:[!1,g,{}]}function X(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Rr({page:e,...t}){let{router:r}=qe(),n=c.useMemo(()=>Me(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?c.createElement(Cr,{page:e,matches:n,...t}):null}function wr(e){let{manifest:t,routeModules:r}=Ke(),[n,o]=c.useState([]);return c.useEffect(()=>{let u=!1;return pr(e,t,r).then(s=>{u||o(s)}),()=>{u=!0}},[e,t,r]),n}function Cr({page:e,matches:t,...r}){let n=Y(),{manifest:o,routeModules:u}=Ke(),{basename:s}=qe(),{loaderData:d,matches:l}=vr(),a=c.useMemo(()=>Ae(e,t,l,o,n,"data"),[e,t,l,o,n]),f=c.useMemo(()=>Ae(e,t,l,o,n,"assets"),[e,t,l,o,n]),p=c.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let C=new Set,x=!1;if(t.forEach(m=>{let v=o.routes[m.route.id];!v||!v.hasLoader||(!a.some(S=>S.route.id===m.route.id)&&m.route.id in d&&u[m.route.id]?.shouldRevalidate||v.hasClientLoader?x=!0:C.add(m.route.id))}),C.size===0)return[];let y=cr(e,s,"data");return x&&C.size>0&&y.searchParams.set("_routes",t.filter(m=>C.has(m.route.id)).map(m=>m.route.id).join(",")),[y.pathname+y.search]},[s,d,n,o,a,t,e,u]),g=c.useMemo(()=>hr(f,o),[f,o]),E=wr(f);return c.createElement(c.Fragment,null,p.map(C=>c.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...r})),g.map(C=>c.createElement("link",{key:C,rel:"modulepreload",href:C,...r})),E.map(({key:C,link:x})=>c.createElement("link",{key:C,nonce:r.nonce,...x})))}function _r(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var Ve=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ve&&(window.__reactRouterVersion="7.9.6")}catch{}function Ur({basename:e,children:t,window:r}){let n=c.useRef();n.current==null&&(n.current=st({window:r,v5Compat:!0}));let o=n.current,[u,s]=c.useState({action:o.action,location:o.location}),d=c.useCallback(l=>{c.startTransition(()=>s(l))},[s]);return c.useLayoutEffect(()=>o.listen(d),[o,d]),c.createElement(tr,{basename:e,children:t,location:u.location,navigationType:u.action,navigator:o})}var Ge=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Je=c.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:o,reloadDocument:u,replace:s,state:d,target:l,to:a,preventScrollReset:f,viewTransition:p,...g},E){let{basename:C}=c.useContext(I),x=typeof a=="string"&&Ge.test(a),y,m=!1;if(typeof a=="string"&&x&&(y=a,Ve))try{let A=new URL(window.location.href),W=a.startsWith("//")?new URL(A.protocol+a):new URL(a),q=j(W.pathname,C);W.origin===A.origin&&q!=null?a=q+W.search+W.hash:m=!0}catch{M(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}let v=It(a,{relative:o}),[S,$,N]=Er(n,g),B=br(a,{replace:s,state:d,target:l,preventScrollReset:f,relative:o,viewTransition:p});function P(A){t&&t(A),A.defaultPrevented||B(A)}let z=c.createElement("a",{...g,...N,href:y||v,onClick:m||u?t:P,ref:_r(E,$),target:l,"data-discover":!x&&r==="render"?"true":void 0});return S&&!x?c.createElement(c.Fragment,null,z,c.createElement(Rr,{page:v})):z});Je.displayName="Link";var xr=c.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:o=!1,style:u,to:s,viewTransition:d,children:l,...a},f){let p=ee(s,{relative:a.relative}),g=Y(),E=c.useContext(ie),{navigator:C,basename:x}=c.useContext(I),y=E!=null&&$r(p)&&d===!0,m=C.encodeLocation?C.encodeLocation(p).pathname:p.pathname,v=g.pathname,S=E&&E.navigation&&E.navigation.location?E.navigation.location.pathname:null;r||(v=v.toLowerCase(),S=S?S.toLowerCase():null,m=m.toLowerCase()),S&&x&&(S=j(S,x)||S);const $=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let N=v===m||!o&&v.startsWith(m)&&v.charAt($)==="/",B=S!=null&&(S===m||!o&&S.startsWith(m)&&S.charAt(m.length)==="/"),P={isActive:N,isPending:B,isTransitioning:y},z=N?t:void 0,A;typeof n=="function"?A=n(P):A=[n,N?"active":null,B?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let W=typeof u=="function"?u(P):u;return c.createElement(Je,{...a,"aria-current":z,className:A,ref:f,style:W,to:s,viewTransition:d},typeof l=="function"?l(P):l)});xr.displayName="NavLink";var Sr=c.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:o,state:u,method:s=ne,action:d,onSubmit:l,relative:a,preventScrollReset:f,viewTransition:p,...g},E)=>{let C=Or(),x=kr(d,{relative:a}),y=s.toLowerCase()==="get"?"get":"post",m=typeof d=="string"&&Ge.test(d),v=S=>{if(l&&l(S),S.defaultPrevented)return;S.preventDefault();let $=S.nativeEvent.submitter,N=$?.getAttribute("formmethod")||s;C($||S.currentTarget,{fetcherKey:t,method:N,navigate:r,replace:o,state:u,relative:a,preventScrollReset:f,viewTransition:p})};return c.createElement("form",{ref:E,method:y,action:x,onSubmit:n?l:v,...g,"data-discover":!m&&e==="render"?"true":void 0})});Sr.displayName="Form";function Pr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Xe(e){let t=c.useContext(G);return O(t,Pr(e)),t}function br(e,{target:t,replace:r,state:n,preventScrollReset:o,relative:u,viewTransition:s}={}){let d=We(),l=Y(),a=ee(e,{relative:u});return c.useCallback(f=>{if(ir(f,t)){f.preventDefault();let p=r!==void 0?r:Q(l)===Q(a);d(e,{replace:p,state:n,preventScrollReset:o,relative:u,viewTransition:s})}},[l,d,a,r,n,t,e,o,u,s])}var Tr=0,Lr=()=>`__${String(++Tr)}__`;function Or(){let{router:e}=Xe("useSubmit"),{basename:t}=c.useContext(I),r=Jt();return c.useCallback(async(n,o={})=>{let{action:u,method:s,encType:d,formData:l,body:a}=sr(n,t);if(o.navigate===!1){let f=o.fetcherKey||Lr();await e.fetch(f,r,o.action||u,{preventScrollReset:o.preventScrollReset,formData:l,body:a,formMethod:o.method||s,formEncType:o.encType||d,flushSync:o.flushSync})}else await e.navigate(o.action||u,{preventScrollReset:o.preventScrollReset,formData:l,body:a,formMethod:o.method||s,formEncType:o.encType||d,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[e,t,r])}function kr(e,{relative:t}={}){let{basename:r}=c.useContext(I),n=c.useContext(H);O(n,"useFormAction must be used inside a RouteContext");let[o]=n.matches.slice(-1),u={...ee(e||".",{relative:t})},s=Y();if(e==null){u.search=s.search;let d=new URLSearchParams(u.search),l=d.getAll("index");if(l.some(f=>f==="")){d.delete("index"),l.filter(p=>p).forEach(p=>d.append("index",p));let f=d.toString();u.search=f?`?${f}`:""}}return(!e||e===".")&&o.route.index&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(u.pathname=u.pathname==="/"?r:F([r,u.pathname])),Q(u)}function $r(e,{relative:t}={}){let r=c.useContext(Fe);O(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Xe("useViewTransitionState"),o=ee(e,{relative:t});if(!r.isTransitioning)return!1;let u=j(r.currentLocation.pathname,n)||r.currentLocation.pathname,s=j(r.nextLocation.pathname,n)||r.nextLocation.pathname;return ae(o.pathname,s)!=null||ae(o.pathname,u)!=null}export{Ur as B,Je as L,xr as N,Ir as O,at as R,Dr as a,De as b,ut as c,Nr as d,lt as e,Mr as f,Ar as g,We as h,Hr as i,er as j,c as r,Y as u};
//# sourceMappingURL=react-B7S5QDrv.js.map