site-panzai/node_modules/@nuxt/devtools/dist/client/_nuxt/nuxt-link-f6563zm1.js

1 line
7.2 KiB
JavaScript
Raw Permalink Normal View History

2026-11-13 13:57:04 +01:00
import{a as e,f as t,i as n,o as r}from"./nuxt-l2zm4y7d.js";import{Ct as i,Et as a,Mt as o,R as s,T as c,V as l,Z as u,k as d,p as f}from"./vendor/json-editor-vue-9tyg6b65.js";import{_t as p,at as m,c as h,d as g,gt as _,lt as v,mt as y,n as b,ot as x,r as S,st as C,t as w}from"./ready-e441jhq2.js";import{d as T,n as E,o as D,p as O,s as k}from"./dist-oig3mfzy.js";var A={scrollBehavior(t,n,r){let i=e(),a=v(),o=a.options?.scrollBehaviorType??`auto`;return t.path.replace(/\/$/,``)===n.path.replace(/\/$/,``)?n.hash&&!t.hash?r??{left:0,top:0}:t.hash?{el:t.hash,top:j(t.hash),behavior:o}:!1:(typeof t.meta.scrollToTop==`function`?t.meta.scrollToTop(t,n):t.meta.scrollToTop)===!1?!1:n===g?M(t,n,r,o):new Promise(e=>{let s=()=>{requestAnimationFrame(()=>{a.currentRoute.value.fullPath===t.fullPath?e(M(t,n,r,o)):e(!1)})};i.hooks.hookOnce(`page:loading:end`,()=>{let e=i[`~transitionPromise`];e?e.then(s):s()})})}};function j(e){try{let t=document.querySelector(e);if(t)return(Number.parseFloat(getComputedStyle(t).scrollMarginTop)||0)+(Number.parseFloat(getComputedStyle(document.documentElement).scrollPaddingTop)||0)}catch{}return 0}function M(e,t,n,r){return n||(e.hash?{el:e.hash,top:j(e.hash),behavior:h(e,t)?r:`instant`}:{left:0,top:0})}var N={hashMode:!1,scrollBehaviorType:`auto`,sensitive:!1,...A},P=/2g/;function F(){let e=navigator.connection;return!e||!e.saveData&&!P.test(e.effectiveType||``)}function I(e){let{pathname:t,search:n}=new URL(e,window.location.href);return t+n}function L(e){if(e?.__asyncLoader&&!e.__asyncResolved)return e.__asyncLoader()}function R(e){return Promise.all(e.map(e=>{let t=e.components?.default;return typeof t==`function`?Promise.resolve(t()).catch(()=>{}):void 0}))}function z(e,t){let{fullPath:r,path:i,matched:a}=t.resolve(e);if(!a.length)return;let o=n()?._prefetch;o?o.schedule({key:`route:${i}`,priority:`route`,scope:`navigation`,group:I(r),run:e=>e.aborted?void 0:R(a)}):R(a)}var B=(...e)=>e.find(e=>e!==void 0);function V(t){let n=t.componentName||`NuxtLink`;function h(e){return typeof e==`string`&&e.startsWith(`#`)}function g(e,n,r){let i=r??t.trailingSlash;if(!e||i!==`append`&&i!==`remove`)return e;if(typeof e==`string`)return U(e,i);let a=`path`in e&&e.path!==void 0?e.path:n(e).path;return{...e,name:void 0,path:U(a,i)}}function T(e){let n=v(),i=r(),a=n.options?.history?.createHref??(e=>D(i.app.baseURL,e)),s=f(()=>!!o(e.target)&&o(e.target)!==`_self`),c=f(()=>{let t=o(e.to)||o(e.href)||``;return typeof t==`string`&&y(t)}),l=f(()=>{if(o(e.external))return!0;let t=o(e.to)||o(e.href)||``;return typeof t==`object`?!1:t===``||c.value}),u=f(()=>{let t=o(e.to)||o(e.href)||``;return l.value?t:g(t,n.resolve,o(e.trailingSlash))}),d=f(()=>{let r=o(e.trailingSlash)??t.trailingSlash;if(!u.value||c.value||h(u.value)){let e=u.value;return typeof e==`string`?p(e):e}if(l.value){let e=typeof u.value==`object`&&`path`in u.value?C(u.value):u.value,t=typeof e==`object`?n.resolve(e).href:e,i=typeof t==`string`?p(t):t;return i===null?null:U(i,r)}return typeof u.value==`object`?n.resolve(u.value)?.href??null:U(_(u.value)?a(u.value):n.resolve(u.value).href,r)});return{to:u,hasTarget:s,isAbsoluteUrl:c,isExternal:l,href:d,async navigate(t){d.value!==null&&await x(d.value,{replace:o(e.replace),external:l.value||s.value})}}}function E(e){let t=v(),n=T(e),r=u(`RouterLink`),i=r&&typeof r!=`string`?r.useLink:void 0,a=n.isExternal.value?void 0:i?.({...e,to:n.to,viewTransition:o(e.viewTransition)});return{...n,isActive:a?.isActive??f(()=>n.to.value===t.currentRoute.value.path),isExactActive:a?.isExactActive??f(()=>n.to.value===t.currentRoute.value.path),route:a?.route??f(()=>t.resolve(n.to.value))}}return c({name:n,props:{to:{type:[String,Object],required:!1},href:{type:[String,Object],required:!1},target:{type:String,required:!1},rel:{type:String,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,required:!1},exactActiveClass:{type:String,required:!1}