1import{s as A,c as D,r as s,d as E,e as X,N as P,p as ae,f as oe,g as ie,j as z,h as _,D as Q,i as le,k as U,A as Z,V as se,l as H,m as G,n as ue,o as ce,q as K,a as fe}from"./components-DsaGih1G.js";import{u as de,m as me,P as he,F as pe,e as j}from"./errorBoundaries-DogMdoIl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2e2df2c5-b739-4e64-a4bf-6ac3761a5c57",e._sentryDebugIdIdentifier="sentry-dbid-2e2df2c5-b739-4e64-a4bf-6ac3761a5c57")}catch{}})();const F="application/x-www-form-urlencoded";function M(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function we(e){return M(e)&&e.tagName.toLowerCase()==="button"}function ye(e){return M(e)&&e.tagName.toLowerCase()==="form"}function Se(e){return M(e)&&e.tagName.toLowerCase()==="input"}function be(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ge(e,n){return e.button===0&&(!n||n==="_self")&&!be(e)}function V(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let r=e[t];return n.concat(Array.isArray(r)?r.map(i=>[t,i]):[[t,r]])},[]))}function Re(e,n){let t=V(e);return n&&n.forEach((r,i)=>{t.has(i)||n.getAll(i).forEach(o=>{t.append(i,o)})}),t}let I=null;function ve(){if(I===null)try{new FormData(document.createElement("form"),0),I=!1}catch{I=!0}return I}const Le=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function O(e){return e!=null&&!Le.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${F}"`),null):e}function xe(e,n){let t,r,i,o,a;if(ye(e)){let u=e.getAttribute("action");r=u?A(u,n):null,t=e.getAttribute("method")||"get",i=O(e.getAttribute("enctype"))||F,o=new FormData(e)}else if(we(e)||Se(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(r=c?A(c,n):null,t=e.getAttribute("formmethod")||u.getAttribute("method")||"get",i=O(e.getAttribute("formenctype"))||O(u.getAttribute("enctype"))||F,o=new FormData(u,e),!ve()){let{name:l,type:f,value:d}=e;if(f==="image"){let y=l?`${l}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else l&&o.append(l,d)}}else{if(M(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t="get",r=null,i=F,a=e}return o&&i==="text/plain"&&(a=o,o=void 0),{action:r,method:t.toLowerCase(),encType:i,formData:o,body:a}}const Ce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{Ce&&(window.__reactRouterVersion="8.3.0")}catch{}const ee=s.forwardRef(function({onClick:n,discover:t="render",prefetch:r="none",relative:i,reloadDocument:o,replace:a,mask:u,state:c,target:l,to:f,preventScrollReset:d,viewTransition:y,defaultShouldRevalidate:p,...S},b){let{basename:g,navigator:h,useTransitions:R}=s.useContext(P),m=typeof f=="string"&&Z.test(f),v=ae(f,g);f=v.to;let w=oe(f,{relative:i}),L=E(),x=null;if(u){let C=ie(u,[],L.mask?L.mask.pathname:"/",!0);g!=="/"&&(C.pathname=C.pathname==="/"?g:z([g,C.pathname])),x=h.createHref(C)}let[T,k,$]=de(r,S),ne=ke(f,{replace:a,mask:u,state:c,target:l,preventScrollReset:d,relative:i,viewTransition:y,defaultShouldRevalidate:p,useTransitions:R});function re(C){n&&n(C),C.defaultPrevented||ne(C)}let Y=!(v.isExternal||o),q=s.createElement("a",{...S,...$,href:(Y?x:void 0)||v.absoluteURL||w,onClick:Y?re:n,ref:me(b,k),target:l,"data-discover":!m&&t==="render"?"true":void 0});return T&&!m?s.createElement(s.Fragment,null,q,s.createElement(he,{page:w})):q});ee.displayName="Link";const Ee=s.forwardRef(function({"aria-current":n="page",caseSensitive:t=!1,className:r="",end:i=!1,style:o,to:a,viewTransition:u,children:c,...l},f){let d=_(a,{relative:l.relative}),y=E(),p=s.useContext(Q),{navigator:S,basename:b}=s.useContext(P),g=p!=null&&Me(d)&&u===!0,h=S.encodeLocation?S.encodeLocation(d).pathname:d.pathname,R=y.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(R=R.toLowerCase(),m=m?m.toLowerCase():null,h=h.toLowerCase()),m&&b&&(m=A(m,b)||m);const v=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let w=R===h||!i&&R.startsWith(h)&&R.charAt(v)==="/",L=m!=null&&(m===h||!i&&m.startsWith(h)&&m.charAt(v)==="/"),x={isActive:w,isPending:L,isTransitioning:g},T=w?n:void 0,k;typeof r=="function"?k=r(x):k=[r,w?"active":null,L?"pending":null,g?"transitioning":null].filter(
1Boolean).join(" ");let $=typeof o=="function"?o(x):o;return s.createElement(ee,{...l,"aria-current":T,className:k,ref:f,style:$,to:a,viewTransition:u},typeof c=="function"?c(x):c)});Ee.displayName="NavLink";const Pe=s.forwardRef(({discover:e="render",fetcherKey:n,navigate:t,reloadDocument:r,replace:i,state:o,method:a="get",action:u,onSubmit:c,relative:l,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:y,...p},S)=>{let{useTransitions:b}=s.useContext(P),g=Fe(),h=De(u,{relative:l}),R=a.toLowerCase()==="get"?"get":"post",m=typeof u=="string"&&Z.test(u),v=w=>{if(c&&c(w),w.defaultPrevented)return;w.preventDefault();let L=w.nativeEvent.submitter,x=L?.getAttribute("formmethod")||a,T=()=>g(L||w.currentTarget,{fetcherKey:n,method:x,navigate:t,replace:i,state:o,relative:l,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:y});b&&t!==!1?s.startTransition(()=>T()):T()};return s.createElement("form",{ref:S,method:R,action:h,onSubmit:r?c:v,...p,"data-discover":!m&&e==="render"?"true":void 0})});Pe.displayName="Form";function Te({getKey:e,storageKey:n,...t}){let r=s.useContext(pe),{basename:i}=s.useContext(P),o=E(),a=K();_e({getKey:e,storageKey:n});let u=s.useMemo(()=>{if(!r||!e)return null;let l=W(o,a,i,e);return l!==o.key?l:null},[]);if(!r||r.isSpaMode)return null;let c=((l,f)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let d=JSON.parse(sessionStorage.getItem(l)||"{}")[f||window.history.state.key];typeof d=="number"&&window.scrollTo(0,d)}catch(d){console.error(d),sessionStorage.removeItem(l)}}).toString();return t.nonce==null&&r?.nonce&&(t.nonce=r.nonce),s.createElement("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${j(JSON.stringify(n||B))}, ${j(JSON.stringify(u))})`}})}Te.displayName="ScrollRestoration";function te(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function J(e){let n=s.useContext(ce);return H(n,te(e)),n}function Ae(e){let n=s.useContext(Q);return H(n,te(e)),n}function ke(e,{target:n,replace:t,mask:r,state:i,preventScrollReset:o,relative:a,viewTransition:u,defaultShouldRevalidate:c,useTransitions:l}={}){let f=X(),d=E(),y=_(e,{relative:a});return s.useCallback(p=>{if(ge(p,n)){p.preventDefault();let S=t!==void 0?t:U(d)===U(y),b=()=>f(e,{replace:S,mask:r,state:i,preventScrollReset:o,relative:a,viewTransition:u,defaultShouldRevalidate:c});l?s.startTransition(()=>b()):b()}},[d,f,y,t,r,i,n,e,o,a,u,c,l])}function Ue(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=s.useRef(V(e)),t=s.useRef(!1),r=E(),i=s.useMemo(()=>Re(r.search,t.current?null:n.current),[r.search]),o=X();return[i,s.useCallback((a,u)=>{const c=V(typeof a=="function"?a(new URLSearchParams(i)):a);t.current=!0,o("?"+c,u)},[o,i])]}let Ie=0,Ne=()=>`__${String(++Ie)}__`;function Fe(){let{router:e}=J("useSubmit"),{basename:n}=s.useContext(P),t=le(),r=e.fetch,i=e.navigate;return s.useCallback(async(o,a={})=>{let{action:u,method:c,encType:l,formData:f,body:d}=xe(o,n);a.navigate===!1?await r(a.fetcherKey||Ne(),t,a.action||u,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:d,formMethod:a.method||c,formEncType:a.encType||l,flushSync:a.flushSync}):await i(a.action||u,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:f,body:d,formMethod:a.method||c,formEncType:a.encType||l,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,n,t])}function De(e,{relative:n}={}){let{basename:t}=s.useContext(P),r=s.useContext(ue);H(r,"useFormAction must be used inside a RouteContext");let[i]=r.matches.slice(-1),o={..._(e||".",{relative:n})},a=E();if(e==null){o.search=a.search;let u=new URLSearchParams(o.search),c=u.getAll("index");if(c.some(l=>l==="")){u.delete("index"),c.filter(f=>f).forEach(f=>u.append("index",f));let l=u.toString();o.search=l?`?${l}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(o.pathname=o.pathname==="/"?t:z([t,o.pathname])),U(o)}const B="react-router-scroll-positions";let N={};function W(e,n,t,r){let i=null;return r&&(t!=="/"?i=r({...e,pathname:A(e.pathname,t)||e.pathname},n):i=r(e,n)),i==null&&(i=e.key),i}function _e({getKey:e,storageKey:n}={}){let{router:t}=J("useScrollRestoration"),{restoreScrollPosition:r,preventScrollReset:i}
1=Ae("useScrollRestoration"),{basename:o}=s.useContext(P),a=E(),u=K(),c=fe();s.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),He(s.useCallback(()=>{if(c.state==="idle"){let l=W(a,u,o,e);N[l]=window.scrollY}try{sessionStorage.setItem(n||B,JSON.stringify(N))}catch(l){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${l}).`)}window.history.scrollRestoration="auto"},[c.state,e,o,a,u,n])),typeof document<"u"&&(s.useLayoutEffect(()=>{try{let l=sessionStorage.getItem(n||B);l&&(N=JSON.parse(l))}catch{}},[n]),s.useLayoutEffect(()=>{let l=t?.enableScrollRestoration(N,()=>window.scrollY,e?(f,d)=>W(f,d,o,e):void 0);return()=>l&&l()},[t,o,e]),s.useLayoutEffect(()=>{if(r!==!1){if(typeof r=="number"){window.scrollTo(0,r);return}try{if(a.hash){let l=document.getElementById(decodeURIComponent(a.hash.slice(1)));if(l){l.scrollIntoView();return}}}catch{D(!1,`"${a.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[a,r,i]))}function He(e,n){let{capture:t}={};s.useEffect(()=>{let r=t!=null?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}function Me(e,{relative:n}={}){let t=s.useContext(se);H(t!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=J("useViewTransitionState"),i=_(e,{relative:n});if(!t.isTransitioning)return!1;let o=A(t.currentLocation.pathname,r)||t.currentLocation.pathname,a=A(t.nextLocation.pathname,r)||t.nextLocation.pathname;return G(i.pathname,a)!=null||G(i.pathname,o)!=null}export{Pe as F,ee as L,Ee as N,Te as S,Fe as a,Ue as u}; 2//# sourceMappingURL=lib-DpjaY7GX.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.