1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/router-xQ5-qKEm.js","assets/rolldown-runtime-S-ySWqyJ.js","assets/index-ZmqoTSF_.js","assets/framework-B8WyT5R3.js","assets/readonly-url-search-params-BRv7ewS0.js","assets/url-utils-BAkPrQqo.js"])))=>i.map(i=>d[i]); 2import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{S as t,_ as n,l as r,n as i,r as a}from"./readonly-url-search-params-BRv7ewS0.js";import{i as o,r as s}from"./framework-B8WyT5R3.js";import{a as c,i as l,n as u,o as d,r as f,s as p}from"./url-utils-BAkPrQqo.js";import{a as m,i as h,n as g,o as ee,s as _,t as te}from"./index-ZmqoTSF_.js";var v=/([/#?\\]|%(2f|23|3f|5c))/gi;function y(e){return e.replace(v,e=>encodeURIComponent(e))}function b(e){try{return y(decodeURIComponent(e))}catch{return e}}function x(e){return e.split(`/`).map(e=>b(e)).join(`/`)}function S(e){try{return decodeURIComponent(e)}catch{return e}}function C(e){for(let t of Object.keys(e)){let n=e[t];Array.isArray(n)?e[t]=n.map(S):e[t]=S(n)}}function w(){return{staticChildren:new Map,dynamicChild:null,catchAllChild:null,optionalCatchAllChild:null,route:null}}function T(e){let t=w();for(let n of e){let e=n.patternParts;if(e.length===0){t.route===null&&(t.route=n);continue}let r=t;for(let t=0;t<e.length;t++){let i=e[t];if(i.endsWith(`+`)&&i.startsWith(`:`)){if(t!==e.length-1)break;let a=i.slice(1,-1);r.catchAllChild===null&&(r.catchAllChild={paramName:a,route:n});break}if(i.endsWith(`*`)&&i.startsWith(`:`)){if(t!==e.length-1)break;let a=i.slice(1,-1);r.optionalCatchAllChild===null&&(r.optionalCatchAllChild={paramName:a,route:n});break}if(i.startsWith(`:`)){let a=i.slice(1);r.dynamicChild===null&&(r.dynamicChild={paramName:a,node:w()}),r=r.dynamicChild.node,t===e.length-1&&r.route===null&&(r.route=n);continue}let a=r.staticChildren.get(i);a||(a=w(),r.staticChildren.set(i,a)),r=a,t===e.length-1&&r.route===null&&(r.route=n)}}return t}function E(e,t){let n=O(e,t,0);return n&&C(n.params),n}function D(){return Object.create(null)}function O(e,t,n){if(n===t.length)return e.route===null?e.optionalCatchAllChild===null?null:{route:e.optionalCatchAllChild.route,params:D()}:{route:e.route,params:D()};let r=t[n],i=e.staticChildren.get(r);if(i){let e=O(i,t,n+1);if(e!==null)return e}if(e.dynamicChild!==null){let i=O(e.dynamicChild.node,t,n+1);if(i!==null)return i.params[e.dynamicChild.paramName]=r,i}if(e.catchAllChild!==null){let r=t.slice(n),i=D();return i[e.catchAllChild.paramName]=r,{route:e.catchAllChild.route,params:i}}if(e.optionalCatchAllChild!==null){let r=t.slice(n),i=D();return i[e.optionalCatchAllChild.paramName]=r,{route:e.optionalCatchAllChild.route,params:i}}return null}function k(){return new WeakMap}function A(e,t){let n=e.get(t);return n||(n=T(t),e.set(t,n)),n}function j(e,t,n){let r=e.split(`?`)[0],i=r===`/`?`/`:r.replace(/\/$/,``);i=x(i);let a=i.split(`/`).filter(Boolean);return E(A(n,t),a)}function M(e){if(e)return e.split(`,`,1)[0]?.trim().split(`:`,1)[0]?.toLowerCase()||void 0}function N(e,t,n){if(!e?.length)return;let r=M(t),i=n?.toLowerCase();for(let t of e)if(r===M(t.domain)||i===t.defaultLocale.toLowerCase()||t.locales?.some(e=>e.toLowerCase()===i))return t}function P(e,t,n){let r=t.toLowerCase();if(r===n.toLowerCase())return e;let i=e.startsWith(`/`)?e:`/${e}`,a=(i.split(/[?#]/,1)[0]??i).toLowerCase(),o=`/${r}`;return a===o||a.startsWith(`${o}/`)?e.startsWith(`/`)?e:i:`/${t}${i}`}function F(e,t=``){return t?t+e:e}function I(e,t,{basePath:n,currentHostname:r,domainItems:i}){if(!i?.length)return;let a=N(i,void 0,t);if(!a)return;let o=N(i,r??void 0),s=P(e,t,a.defaultLocale);if(!(o&&M(o.domain)===M(a.domain)))return`${`http${a.http?``:`s`}://`}${a.domain}${F(s,n)}`}function L(e,t,n){Object.defineProperty(e,t,{value:n,enumerable:!0,writable:!0,configurable:!0})}function ne(e,t,n){if(Object.hasOwn(e,t)){let r=e[t];L(e,t,Array.isArray(r)?r.concat(n):[r,n])}else L(e,t,n)}function R(e){return typeof e==`string`?e:typeof e==`number`&&!isNaN(e)||typeof e==`boolean`?String(e):``}function z(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e)){if(Array.isArray(r)){for(let e of r)t.append(n,R(e));continue}t.set(n,R(r))}return t}function B(e,t){let n=e.indexOf(`#`),r=n===-1?e:e.slice(0,n),i=n===-1?``:e.slice(n),a=r.indexOf(`?`),o=a===-1?r:r.slice(0,a),s=a===-1?``:r.slice(a+1),c=new URLSearchParams(s);for(let[e,n]of t)c.append(e,n);let l=c.toString();return`${o}${l?`?${l}`:``}${i}`}var V=()=>globalThis.__VINEXT_DEFAULT_LOCALE__==null&&globalThis.__VINEXT_LOCALE__==null?null:{locale:globalThis.__VINEXT_LOCALE__,locales:globalThis.__VINEXT_LOCALES__,defaultLocale:globalThis.__VINEXT_DEFAULT_LOCALE__,domainLocales:globalThis.__VINEXT_DOMAIN_LOCALES__,hostname:globalThis.__VINEXT_HOSTNAME__};function H(){return V()}
2function U(e){return e.nodeEnv===`production`&&e.prefetch!==!1&&!e.isDangerous}function W(e){let{href:t,basePath:n,currentOrigin:r}=e;if(!re(t))return t;if(r===void 0)return null;try{let e=new URL(r),i=t.startsWith(`//`)?new URL(t,e.origin):new URL(t);return i.origin===e.origin?n?d(i.pathname,n)?p(i.pathname,n)+i.search+i.hash:null:i.pathname+i.search+i.hash:null}catch{return null}}function re(e){return e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)}var G=e(o(),1),K=s(),q=(0,G.createContext)({pending:!1});function ie(){return(0,G.useContext)(q)}var J=``,ae=k();function oe(e){if(typeof e==`string`)return e;let t=e.pathname??`/`;if(e.query){let n=z(e.query);t=B(t,n)}return t}function Y(e,t){return t||e===!1?`disabled`:e===!0?`full`:`auto`}function se(e){if(typeof window>`u`)return null;let t;try{t=new URL(e,window.location.href)}catch{return null}return t.origin===window.location.origin?`${p(t.pathname,J)}${t.search}`:null}function X(e){if(typeof window>`u`)return!1;let t=window.__VINEXT_LINK_PREFETCH_ROUTES__;if(!t)return!1;let n=se(e);if(n===null)return!1;let r=j(n,t,ae);return r?!r.route.isDynamic:!1}function Z(e,n,o=`low`){if(typeof window>`u`)return;let s=W({href:e,basePath:J,currentOrigin:window.location.origin});if(s==null)return;let c=f(s,window.location.href,J);(window.requestIdleCallback??(e=>setTimeout(e,100)))(()=>{(async()=>{if(typeof window.__VINEXT_RSC_NAVIGATE__==`function`){if(n===`auto`&&!X(s))return;let e=g(),l=h(),u=i({interceptionContext:e});l&&u.set(t,l);let d=await a(c,u),f=r.encodeCacheKey(d,e),p=m();if(p.has(f))return;p.add(f),_(d,fetch(d,{headers:u,credentials:`include`,priority:o,purpose:`prefetch`}),e,l)}else if(window.__NEXT_DATA__?.__vinext?.pageModuleUrl){let e=document.createElement(`link`);e.rel=`prefetch`,e.href=c,e.as=`document`,document.head.appendChild(e)}})().catch(e=>{console.error(`[vinext] RSC prefetch setup error:`,e)})})}var Q=null,$=new WeakMap;function ce(){return typeof window>`u`||typeof IntersectionObserver>`u`?null:Q||(Q=new IntersectionObserver(e=>{for(let t of e)if(t.isIntersecting){let e=$.get(t.target);e&&(e(),Q?.unobserve(t.target),$.delete(t.target))}},{rootMargin:`250px`}),Q)}function le(){return typeof window<`u`?window.__VINEXT_DEFAULT_LOCALE__:H()?.defaultLocale}function ue(){return typeof window<`u`?window.__NEXT_DATA__?.domainLocales:H()?.domainLocales}function de(){return typeof window<`u`?window.location.hostname:H()?.hostname}function fe(e,t){return I(e,t,{basePath:J,currentHostname:de(),domainItems:ue()})}function pe(e,t){return t===!1||t===void 0||e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(`//`)?e:fe(e,t)||P(e,t,le()??``)}var me=(0,G.forwardRef)(function({href:e,as:t,replace:r=!1,prefetch:i,scroll:a=!0,children:o,onClick:s,onMouseEnter:d,onTouchStart:p,onNavigate:m,...h},g){let{locale:_,...v}=h,y=t??oe(e),b=typeof y==`string`&&n(y),x=pe(b?`/`:y,_),S=c(x,J),[C,w]=(0,G.useState)(!1),T=(0,G.useRef)(!0);(0,G.useEffect)(()=>(T.current=!0,()=>{T.current=!1}),[]);let E=(0,G.useRef)(null),D=Y(i,b),O=U({nodeEnv:`production`,prefetch:i,isDangerous:b}),k=(0,G.useCallback)(e=>{E.current=e,typeof g==`function`?g(e):g&&(g.current=e)},[g]);(0,G.useEffect)(()=>{if(!O||typeof window>`u`)return;let e=E.current;if(!e)return;let t=W({href:x,basePath:J,currentOrigin:window.location.origin});if(t==null)return;let n=ce();if(n)return $.set(e,()=>Z(t,D,`low`)),n.observe(e),()=>{n.unobserve(e),$.delete(e)}},[O,D,x]);let A=(0,G.useCallback)(()=>{O&&Z(x,D,`high`)},[O,D,x]),j=(0,G.useCallback)(e=>{d?.(e),A()},[d,A]),M=(0,G.useCallback)(e=>{p?.(e),A()},[p,A]),N=async e=>{if(s&&s(e),e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.currentTarget.target&&e.currentTarget.target!==`_self`)return;let t=x;if(y.startsWith(`http://`)||y.startsWith(`https://`)||y.startsWith(`//`)){let e=l(y,J);if(e==null)return;t=e}e.preventDefault();let n=u(t,window.location.href,J),i=f(t,window.location.href,J);if(m)try{let e=new URL(i,window.location.origin),t=!1,n={url:e,preventDefault(){t=!0},get defaultPrevented(){return t}};if(m(n),n.defaultPrevented)return}catch{}if(typeof window.__VINEXT_RSC_NAVIGATE__==`function`){w(!0),G.startTransition(()=>{ee(t,r?`replace`:`push`,a,!0).finally(()=>{T.current&&w(!1)})});return}else try{let e=(await te(async()=>{let{default:e}=await import(`./router-xQ5-qKEm.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4,5]))).default;r?await e.replace(n,void 0,{scroll:a}):await e.push(n,void 0,{scroll:a})}catch{r?window.history.replaceState({},``,i):window.history.pushState({},``,i),window.dispatchEvent(new PopStateEvent(`popstate`))}},{passHref:P,...F}=v,I=G.useMemo(()=>({pending:C}),[C]);return b?(0,K.jsx)(`a`,{...F,onMouseEnter:j,onTouchStart:M,children:o}):(0,K.jsx)(q.Provider,{value:I,children:(0,K.jsx)(`a`,{ref:k,href:S,onClick:e=>{N(e)},onMouseEnter:j,onTouchStart:M,...F,children:o})})});export{I as a,X as canAutoPrefetchFullAppRoute,me as default,P as i,B as n,z as r,Y as resolveLinkPrefetchMode,ne as t,ie as useLinkStatus};
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.