1import{i as e}from"./chunk-aKtaBQYM.js";import{Qf as t,Zf as n}from"./utils-F-m3YQJJ.js";import{H as r}from"./button-C92u5DuV.js";import{t as i}from"./with-selector-BaF4uVi5.js";function a(e){return e[e.length-1]}function o(e){return typeof e==`function`}function s(e,t){return o(e)?e(t):e}var c=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable;function u(e){for(let t in e)if(c.call(e,t))return!0;return!1}var d=()=>Object.create(null),f=(e,t)=>p(e,t,d);function p(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=_(e)&&_(i);if(!a&&!(h(e)&&h(i)))return i;let o=a?e:m(e);if(!o)return i;let s=a?i:m(i);if(!s)return i;let l=o.length,u=s.length,d=a?Array(u):n(),f=0;for(let t=0;t<u;t++){let o=a?t:s[t],u=e[o],m=i[o];if(u===m){d[o]=u,(a?t<l:c.call(e,o))&&f++;continue}if(u===null||m===null||typeof u!=`object`||typeof m!=`object`){d[o]=m;continue}let h=p(u,m,n,r+1);d[o]=h,h===u&&f++}return l===u&&f===l?e:d}function m(e){let t=Object.getOwnPropertyNames(e);for(let n of t)if(!l.call(e,n))return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;let r=t;for(let t of n){if(!l.call(e,t))return!1;r.push(t)}return r}function h(e){if(!g(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!g(n)||!n.hasOwnProperty(`isPrototypeOf`))}function g(e){return Object.prototype.toString.call(e)===`[object Object]`}function _(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function v(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!v(e[r],t[r],n))return!1;return!0}if(h(e)&&h(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!v(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!v(e[o],t[o],n)))return!1;return i===a}return!1}function y(e){let t,n,r=new Promise((e,r)=>{t=e,n=r});return r.status=`pending`,r.resolve=n=>{r.status=`resolved`,r.value=n,t(n),e?.(n)},r.reject=e=>{r.status=`rejected`,n(e)},r}function b(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}
1function x(e){return!!(e&&typeof e==`object`&&typeof e.then==`function`)}function S(e){return e.replace(/[\x00-\x1f\x7f]/g,``)}function C(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return S(t)}var w=[`http:`,`https:`,`mailto:`,`tel:`];function ee(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}var T={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},E=/[&><\u2028\u2029]/g;function D(e){return e.replace(E,e=>T[e])}function O(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=C(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=C(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function te(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function ne(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function re(){throw Error(`Invariant failed`)}function k(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var A=4,ie=5;function ae(e){let t=e.indexOf(`{`);if(t===-1)return null;let n=e.indexOf(`}`,t);return n===-1||t+1>=e.length?null:[t,n]}function oe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=ae(a);if(o){let[r,s]=o,c=a.charCodeAt(r+1);if(c===45){if(r+2<a.length&&a.charCodeAt(r+2)===36){let e=r+3,a=s;if(e<a)return n[0]=3,n[1]=t+r,n[2]=t+e,n[3]=t+a,n[4]=t+s+1,n[5]=i,n}}else if(c===36){let a=r+1,o=r+2;return o===s?(n[0]=2,n[1]=t+r,n[2]=t+a,n[3]=t+o,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+r,n[2]=t+o,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function j(e,t,n,r,i,a,o){o?.(n);let s=r;{let r=n.fullPath??n.from,o=r.length,c=n.options?.caseSensitive??e,l=n.options?.params?.parse??n.options?.parseParams;for(;s<o;){let e=oe(r,s,t),o,u=s,d=e[5];switch(s=d+1,a++,e[0]){case 0:{let t=r.substring(e[2],e[3]);if(c){let e=i.static?.get(t);if(e)o=e;else{i.static??=new Map;let e=N(n.fullPath??n.from);e.parent=i,e.depth=a,o=e,i.static.set(t,e)}}else{let e=t.toLowerCase(),r=i.staticInsensitive?.get(e);if(r)o=r;else{i.staticInsensitive??=new Map;let t=N(n.fullPath??n.from);t.parent=i,t.depth=a,o=t,i.staticInsensitive.set(e,t)}}break}case 1:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.dynamic?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(1,n.fullPath??n.from,f,p,m);o=e,e.depth=a,e.parent=i,i.dynamic??=[],i.dynamic.push(e)}break}case 3:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),f=c&&!!(t||s),p=t?f?t:t.toLowerCase():void 0,m=s?f?s:s.toLowerCase():void 0,h=!l&&i.optional?.find(e=>!e.parse&&e.caseSensitive===f&&e.prefix===p&&e.suffix===m);if(h)o=h;else{let e=P(3,n.fullPath??n.from,f,p,m);o=e,e.parent=i,e.depth=a,i.optional??=[],i.optional.push(e)}break}case 2:{let t=r.substring(u,e[1]),s=r.substring(e[4],d),l=c&&!!(t||s),f=t?l?t:t.toLowerCase():void 0,p=s?l?s:s.toLowerCase():void 0,m=P(2,n.fullPath??n.from,l,f,p);o=m,m.parent=i,m.depth=a,i.wildcard??=[],i.wildcard.push(m)}}i=o}if(l&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=N(n.fullPath??n.from);e.kind=ie,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let u=(n.path||!n.children)&&!n.isRoot;if(u&&r.endsWith(`/`)){let e=N(n.fullPath??n.from);e.kind=A,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=l??null,i.priority=n.options?.params?.priority??0,u&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(let r of n.children)j(e,t,r,s,i,a,o)}function se(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function M(e){if(e.pathless)for(let t of e.pathless)M(t);if(e.static)for(let t of e.static.values())M(t);if(e.staticInsensitive)for(let t of e.staticInsensitive.values())M(t);if(e.dynamic?.length){e.dynamic.sort(se);for(let t of e.dynamic)M(t)}if(e.optional?.length){e.optional.sort(se);for(let t of e.optional)M(t)}if(e.wildcard?.length){e.wildcard.sort(se);for(let t of e.wildcard)M(t)}}function N(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function P(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function F(e,t){let n=N(`/`),r=new Uint16Array(6);for(let t of e)j(!1,r,t,1,n,0);M(n),t.masksTree=n,t.flatCache=k(1e3)}function I(e,t){e||=`/`;let n=t.flatCache.get(e);if(n)return n;let r=z(e,t.masksTree);return t.flatCache.set(e,r),r}function ce(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=N(`/`),j(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),z(r,o,n)}function le(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=z(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=V(a.route)),t.matchCache.set(r,a),a}function L(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function R(e,t=!1,n){let r=N(e.fullPath),i=new Uint16Array(6),a={},o={},s=0;return j(t,i,e,1,r,0,e=>{if(n?.(e,s),e.id in a&&re(),a[e.id]=e,s!==0&&e.path){let t=L(e.fullPath);(!o[t]||e.fullPath.endsWith(`/`))&&(o[t]=e)}s++}),M(r),{processedTree:{segmentTree:r,singleCache:k(1e3),matchCache:k(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function z(e,t,n=!1){let r=e.split(`/`),i=de(e,r,t,n);if(!i)return null;let[a]=B(e,r,i);return{route:i.node.route,rawParams:a}}function B(e,t,n){let r=ue(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===A)break;if(u.kind===ie){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0;if(e.charCodeAt(t)===123){let n=u.suffix?.length??0,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix?.length??0,r=u.suffix?.length??0,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+(t.prefix?.length??0),e.length-(t.suffix?.length??0)),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function V(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function ue(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function de(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!a(t),o=i&&e!==`/`,s=t.length-+!!i,c=[{node:n,index:1,skipped:0,depth:1,statics:0,dynamics:0,optionals:0}],l=null,u=null;for(;c.length;){let n=c.pop(),{node:i,index:a,skipped:d,depth:f,statics:p,dynamics:m,optionals:h}=n,{extract:g,rawParams:_}=n;if(i.kind===2&&i.route&&!W(u,n))continue;if(i.parse){if(!U(e,t,n))continue;_=n.rawParams,g=n.extract}r&&i.route&&i.kind!==A&&W(l,n)&&(l=n);let v=a===s;if(v&&(i.route&&(!o||i.kind===A||i.kind===2)&&W(u,n)&&(u=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let y=v?void 0:t[a],b;if(v&&i.index){let n={node:i.index,index:a,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_},r=!0;
1if(i.index.parse&&(U(e,t,n)||(r=!1)),r){if(!m&&!h&&!d&&fe(p,s))return n;W(u,n)&&(u=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:o}=n;if(!(r&&(v||!(n.caseSensitive?y:b??=y.toLowerCase()).startsWith(r)))){if(o){if(v)continue;let e=t.slice(a).join(`/`).slice(-o.length);if((n.caseSensitive?e:e.toLowerCase())!==o)continue}c.push({node:n,index:s,skipped:d,depth:f+1,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}if(i.optional){let e=d|1<<f,t=f+1;for(let n=i.optional.length-1;n>=0;n--){let r=i.optional[n];c.push({node:r,index:a,skipped:e,depth:t,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v)for(let e=i.optional.length-1;e>=0;e--){let n=i.optional[e],{prefix:r,suffix:o}=n;if(r||o){let e=n.caseSensitive?y:b??=y.toLowerCase();if(r&&!e.startsWith(r)||o&&!e.endsWith(o))continue}c.push({node:n,index:a+1,skipped:d,depth:t,statics:p,dynamics:m,optionals:h+H(s,a),extract:g,rawParams:_})}}if(!v&&i.dynamic&&y)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?y:b??=y.toLowerCase();if(n&&!e.startsWith(n)||r&&!e.endsWith(r))continue}c.push({node:t,index:a+1,skipped:d,depth:f+1,statics:p,dynamics:m+H(s,a),optionals:h,extract:g,rawParams:_})}if(!v&&i.staticInsensitive){let e=i.staticInsensitive.get(b??=y.toLowerCase());e&&c.push({node:e,index:a+1,skipped:d,depth:f+1,statics:p+H(s,a),dynamics:m,optionals:h,extract:g,rawParams:_})}if(!v&&i.static){let e=i.static.get(y);e&&c.push({node:e,index:a+1,skipped:d,depth:f+1,statics:p+H(s,a),dynamics:m,optionals:h,extract:g,rawParams:_})}if(i.pathless){let e=f+1;for(let t=i.pathless.length-1;t>=0;t--){let n=i.pathless[t];c.push({node:n,index:a,skipped:d,depth:e,statics:p,dynamics:m,optionals:h,extract:g,rawParams:_})}}}if(u)return u;if(r&&l){let n=l.index;for(let e=0;e<l.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return l.rawParams??=Object.create(null),l.rawParams[`**`]=decodeURIComponent(r),l}return null}function H(e,t){return 2**(e-t-1)}function fe(e,t){return e===2**(t-1)-1}function U(e,t,n){let r,i;try{[r,i]=B(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function W(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===A)>(e.node.kind===A)||t.node.kind===A==(e.node.kind===A)&&t.depth>e.depth))):!0}function G(e){return K(e.filter(e=>e!==void 0).join(`/`))}function K(e){return e.replace(/\/{2,}/g,`/`)}function pe(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function q(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function me(e){return q(pe(e))}function J(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function he(e,t,n){return J(e,n)===J(t,n)}function ge({base:e,to:t,trailingSlash:n=`never`,cache:r}){let i=t.startsWith(`/`),o=!i&&t===`.`,s;if(r){s=i?t:o?e:e+`\0`+t;let n=r.get(s);if(n)return n}let c;if(o)c=e.split(`/`);else if(i)c=t.split(`/`);else{for(c=e.split(`/`);c.length>1&&a(c)===``;)c.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&c.push(r):c=[r]:r===`..`?c.pop():r===`.`||c.push(r)}}c.length>1&&(a(c)===``?n===`never`&&c.pop():n===`always`&&c.push(``));let l=K(c.join(`/`))||`/`;return s&&r&&r.set(s,l),l}function _e(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function ve(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>be(e,n)).join(`/`):be(r,n):r}function ye({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=oe(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=ve(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ve(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=ve(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function be(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var xe=`Error preloading route! âï¸`,Y=e(t(),1),Se=Y.use,Ce=typeof window<`u`?Y.useLayoutEffect:Y.useEffect;function we(e){let t=Y.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function Te(e,t,n={},r={}){Y.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!=`function`)return;let i=new IntersectionObserver(([e])=>{t(e)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function Ee(e){let t=Y.useRef(null);return Y.useImperativeHandle(e,()=>t.current,[]),t}var X=n();function De({children:e,fallback:t=null}){return Oe()?(0,X.jsx)(Y.Fragment,{children:e}):(0,X.jsx)(Y.Fragment,{children:t})}function Oe(){return Y.useSyncExternalStore(ke,()=>!0,()=>!1)}function ke(){return()=>{}}var Ae=Y.createContext(null);function Z(e){return Y.useContext(Ae)}var je=i();function Me(e,t){return e===t}function Ne(e,t,n=Me){let r=(0,Y.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,Y.useCallback)(()=>e?.get(),[e]);return(0,je.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Pe=e(r(),1);function Fe(e,t){let n=Z(),r=Ee(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:h,viewTransition:g,children:_,target:y,disabled:b,style:x,className:S,onClick:C,onBlur:w,onFocus:T,onMouseEnter:E,onMouseLeave:D,onTouchStart:O,ignoreBlocker:te,params:ne,search:re,hash:k,state:A,mask:ie,reloadDocument:ae,unsafeRelative:oe,from:j,_fromLocation:se,...M}=e,N=Oe(),P=Y.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),F=Ne(n.stores.location,e=>e,(e,t)=>e.href===t.href),I=Y.useMemo(()=>{let e={_fromLocation:F,...P};return n.buildLocation(e)},[n,F,P]),ce=I.maskedLocation?I.maskedLocation.publicHref:I.publicHref,le=I.maskedLocation?I.maskedLocation.external:I.external,L=Y.useMemo(()=>He(ce,le,n.history,b),[b,le,ce,n.history]),R=Y.useMemo(()=>
1{if(L?.external)return ee(L.href,n.protocolAllowlist)?void 0:L.href;if(!Ue(c)&&!(typeof c!=`string`||c.indexOf(`:`)===-1))try{return new URL(c),ee(c,n.protocolAllowlist)?void 0:c}catch{}},[c,L,n.protocolAllowlist]),z=Y.useMemo(()=>{if(R)return!1;if(o?.exact){if(!he(F.pathname,I.pathname,n.basepath))return!1}else{let e=J(F.pathname,n.basepath),t=J(I.pathname,n.basepath);if(!(e.startsWith(t)&&(e.length===t.length||e[t.length]===`/`)))return!1}return(o?.includeSearch??!0)&&!v(F.search,I.search,{partial:!o?.exact,ignoreUndefined:!o?.explicitUndefined})?!1:o?.includeHash?N&&F.hash===I.hash:!0},[o?.exact,o?.explicitUndefined,o?.includeHash,o?.includeSearch,F,R,N,I.hash,I.pathname,I.search,n.basepath]),B=z?s(i,{})??Le:Ie,V=z?Ie:s(a,{})??Ie,ue=[S,B.className,V.className].filter(Boolean).join(` `),de=(x||B.style||V.style)&&{...x,...B.style,...V.style},[H,fe]=Y.useState(!1),U=Y.useRef(!1),W=e.reloadDocument||R?!1:l??n.options.defaultPreload,G=u??n.options.defaultPreloadDelay??0,K=Y.useCallback(()=>{n.preloadRoute({...P,_builtLocation:I}).catch(e=>{console.warn(e),console.warn(xe)})},[n,P,I]);Te(r,Y.useCallback(e=>{e?.isIntersecting&&K()},[K]),Ve,{disabled:!!b||W!==`viewport`}),Y.useEffect(()=>{U.current||!b&&W===`render`&&(K(),U.current=!0)},[b,K,W]);let pe=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;if(!b&&!Ge(e)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0){e.preventDefault(),(0,Pe.flushSync)(()=>{fe(!0)});let t=n.subscribe(`onResolved`,()=>{t(),fe(!1)});n.navigate({...P,replace:p,resetScroll:h,hashScrollIntoView:f,startTransition:m,viewTransition:g,ignoreBlocker:te})}};if(R)return{...M,ref:r,href:R,..._&&{children:_},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...C&&{onClick:C},...w&&{onBlur:w},...T&&{onFocus:T},...E&&{onMouseEnter:E},...D&&{onMouseLeave:D},...O&&{onTouchStart:O}};let q=e=>{if(b||W!==`intent`)return;if(!G){K();return}let t=e.currentTarget;if(Q.has(t))return;let n=setTimeout(()=>{Q.delete(t),K()},G);Q.set(t,n)},me=e=>{b||W!==`intent`||K()},ge=e=>{if(b||!W||!G)return;let t=e.currentTarget,n=Q.get(t);n&&(clearTimeout(n),Q.delete(t))};return{...M,...B,...V,href:L?.href,ref:r,onClick:$([C,pe]),onBlur:$([w,ge]),onFocus:$([T,q]),onMouseEnter:$([E,q]),onMouseLeave:$([D,ge]),onTouchStart:$([O,me]),disabled:!!b,target:y,...de&&{style:de},...ue&&{className:ue},...b&&Re,...z&&ze,...N&&H&&Be}}var Ie={},Le={className:`active`},Re={role:`link`,"aria-disabled":!0},ze={"data-status":`active`,"aria-current":`page`},Be={"data-transitioning":`transitioning`},Q=new WeakMap,Ve={rootMargin:`100px`},$=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function He(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function Ue(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var We=Y.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=Fe(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return Y.createElement(`a`,t,o)}return Y.createElement(n,a,o)});function Ge(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Ke(e){let t=Z(),n=(0,Y.useRef)(void 0);return Ne(t.stores.location,r=>{let i=e?.select?e.select(r):r;if(e?.structuralSharing??t.options.defaultStructuralSharing){let e=p(n.current,i);return n.current=e,e}return i})}function qe({href:e,locale:t,prefetch:n,...r}){return/^(https?:|mailto:|tel:|#)/.test(e)?(0,X.jsx)(`a`,{href:e,...r}):(0,X.jsx)(We,{to:e,...r})}function Je(){return Ke().pathname}function Ye(e){let[t,n]=e.split(`#`),[r,i]=t.split(`?`);return{to:r||`/`,search:i?Object.fromEntries(new URLSearchParams(i)):void 0,hash:n}}function Xe(){let e=Z();return{push:t=>{e.navigate(Ye(t))},replace:t=>{e.navigate({...Ye(t),replace:!0})},back:()=>e.history.back(),forward:()=>e.history.forward(),refresh:()=>e.invalidate(),prefetch:e=>{}}}export{ne as A,x as B,le as C,k as D,R as E,D as F,f as H,s as I,u as L,O as M,v as N,re as O,te as P,ee as R,I as S,F as T,p as U,a as V,ge as _,Ne as a,q as b,De as c,Ce as d,we as f,G as g,ye as h,We as i,y as j,w as k,Oe as l,_e as m,Je as n,Z as o,K as p,Xe as r,Ae as s,qe as t,Se as u,me as v,ce as w,V as x,pe as y,b as z};
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.