Files
service-finder/frontend_admin/.nuxt/dist/client/_nuxt/C2l6xpLd.js
2026-07-01 19:49:58 +00:00

2 lines
5.5 KiB
JavaScript

import{e as E,q as A,E as q,g as j,W as N,X as U,Y as H,Z as I,_ as P,$ as _,a0 as D,a1 as F,l as V,a2 as O,a3 as W,i as f,G as z,m as x,a4 as B,a5 as M,a6 as $,a7 as G,a8 as Q,a9 as X,aa as Y,ab as Z}from"./BIbQr1Hg.js";const J=(...t)=>t.find(r=>r!==void 0);function T(t){let r=t.replace(/[\u0000-\u001f\s]+/g,"");for(;r.toLowerCase().startsWith("view-source:");)r=r.slice(12);const c=r.indexOf(":");return c>0&&Q(r.slice(0,c+1))?null:t}function K(t){const r=t.componentName||"NuxtLink";function c(e){return typeof e=="string"&&e.startsWith("#")}function C(e,s,d){const a=d??t.trailingSlash;if(!e||a!=="append"&&a!=="remove")return e;if(typeof e=="string")return R(e,a);const i="path"in e&&e.path!==void 0?e.path:s(e).path;return{...e,name:void 0,path:R(i,a)}}function k(e){const s=A(),d=Z(),a=x(()=>!!f(e.target)&&f(e.target)!=="_self"),i=x(()=>{const o=f(e.to)||f(e.href)||"";return typeof o=="string"&&B(o,{acceptRelative:!0})}),S=_("RouterLink"),y=S&&typeof S!="string"?S.useLink:void 0,v=x(()=>{if(f(e.external))return!0;const o=f(e.to)||f(e.href)||"";return typeof o=="object"?!1:o===""||i.value}),l=x(()=>{const o=f(e.to)||f(e.href)||"";return v.value?o:C(o,s.resolve,f(e.trailingSlash))}),b=v.value?void 0:y?.({...e,to:l,viewTransition:f(e.viewTransition)}),m=x(()=>{const o=f(e.trailingSlash)??t.trailingSlash;if(!l.value||i.value||c(l.value)){const h=l.value;return typeof h=="string"?T(h):h}if(v.value){const h=typeof l.value=="object"&&"path"in l.value?O(l.value):l.value,p=typeof h=="object"?s.resolve(h).href:h,u=typeof p=="string"?T(p):p;return u===null?null:R(u,o)}return typeof l.value=="object"?s.resolve(l.value)?.href??null:R(M(d.app.baseURL,l.value),o)});return{to:l,hasTarget:a,isAbsoluteUrl:i,isExternal:v,href:m,isActive:b?.isActive??x(()=>l.value===s.currentRoute.value.path),isExactActive:b?.isExactActive??x(()=>l.value===s.currentRoute.value.path),route:b?.route??x(()=>s.resolve(l.value)),async navigate(o){m.value!==null&&await z(m.value,{replace:f(e.replace),external:v.value||a.value})}}}return E({name:r,props:{to:{type:[String,Object],default:void 0,required:!1},href:{type:[String,Object],default:void 0,required:!1},target:{type:String,default:void 0,required:!1},rel:{type:String,default:void 0,required:!1},noRel:{type:Boolean,default:void 0,required:!1},prefetch:{type:Boolean,default:void 0,required:!1},prefetchOn:{type:[String,Object],default:void 0,required:!1},noPrefetch:{type:Boolean,default:void 0,required:!1},activeClass:{type:String,default:void 0,required:!1},exactActiveClass:{type:String,default:void 0,required:!1},prefetchedClass:{type:String,default:void 0,required:!1},replace:{type:Boolean,default:void 0,required:!1},ariaCurrentValue:{type:String,default:void 0,required:!1},external:{type:Boolean,default:void 0,required:!1},custom:{type:Boolean,default:void 0,required:!1},trailingSlash:{type:String,default:void 0,required:!1}},useLink:k,setup(e,{slots:s}){const d=A(),{to:a,href:i,navigate:S,isExternal:y,hasTarget:v,isAbsoluteUrl:l}=k(e),b=F(!1),m=V(null),o=u=>{m.value=e.custom?u?.$el?.nextElementSibling:u?.$el};function h(u){return!b.value&&(typeof e.prefetchOn=="string"?e.prefetchOn===u:e.prefetchOn?.[u]??t.prefetchOn?.[u])&&(e.prefetch??t.prefetch)!==!1&&e.noPrefetch!==!0&&e.target!=="_blank"&&!ae()}async function p(u=q()){if(b.value||i.value===null)return;b.value=!0;const g=typeof a.value=="string"?a.value:y.value?O(a.value):d.resolve(a.value).fullPath,n=y.value?new URL(g,window.location.href).href:g;await Promise.all([u.hooks.callHook("link:prefetch",n).catch(()=>{}),!y.value&&!v.value&&W(a.value,d).catch(()=>{})])}if(h("visibility")){const u=q();let g,n=null;j(()=>{const w=ee();N(()=>{g=U(()=>{m?.value?.tagName&&(n=w.observe(m.value,async()=>{n?.(),n=null,await p(u)}))})})}),H(()=>{g&&I(g),n?.(),n=null})}return()=>{if(!y.value&&!v.value&&!c(a.value)){const n={ref:o,to:a.value,activeClass:e.activeClass||t.activeClass,exactActiveClass:e.exactActiveClass||t.exactActiveClass,replace:e.replace,ariaCurrentValue:e.ariaCurrentValue,custom:e.custom};return e.custom||(h("interaction")&&(n.onPointerenter=p.bind(null,void 0),n.onFocus=p.bind(null,void 0)),b.value&&(n.class=e.prefetchedClass||t.prefetchedClass),n.rel=e.rel||void 0),P(_("RouterLink"),n,s.default)}const u=e.target||null,g=J(e.noRel?"":e.rel,t.externalRelAttribute,l.value||v.value?"noopener noreferrer":"")||null;return e.custom?s.default?s.default({href:i.value,navigate:S,prefetch:p,get route(){if(!i.value)return;const n=new URL(i.value,window.location.href);return{path:n.pathname,fullPath:n.pathname,get query(){return D(n.search)},hash:n.hash,params:{},name:void 0,matched:[],redirectedFrom:void 0,meta:{},href:i.value}},rel:g,target:u,isExternal:y.value||v.value,isActive:!1,isExactActive:!1}):null:P("a",{ref:m,href:i.value||null,rel:g,target:u,onClick:async n=>{if(!(y.value||v.value)){n.preventDefault();try{const w=$(i.value??"");return await(e.replace?d.replace(w):d.push(w))}finally{if(c(a.value)){const w=a.value.slice(1);let L=w;try{L=decodeURIComponent(w)}catch{}document.getElementById(L)?.focus()}}}}},s.default?.())}}})}const le=K(G);function R(t,r){const c=r==="append"?X:Y;return B(t)&&!t.startsWith("http")?t:c(t,!0)}function ee(){const t=q();if(t._observer)return t._observer;let r=null;const c=new Map,C=(e,s)=>(r||=new IntersectionObserver(d=>{for(const a of d){const i=c.get(a.target);(a.isIntersecting||a.intersectionRatio>0)&&i&&i()}}),c.set(e,s),r.observe(e),()=>{c.delete(e),r?.unobserve(e),c.size===0&&(r?.disconnect(),r=null)});return t._observer={observe:C}}const te=/2g/;function ae(){const t=navigator.connection;return!!(t&&(t.saveData||te.test(t.effectiveType)))}export{le as _};