LightRAG/lightrag/api/webui/assets/react-vendor-CgPb4pW_.js
2025-07-14 17:19:28 +08:00

19 lines
46 KiB
JavaScript
Generated

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