MCPcopy
hub / github.com/vitest-dev/vitest / L1

Function L1

test/cli/test/fixtures/reporters/html/fail/assets/index-BUCFJtth.js:53–53  ·  view source on GitHub ↗
(e,t)

Source from the content-addressed store, hash-verified

51 * (c) 2025 Eduardo San Martin Morote
52 * @license MIT
53 */const Ls=typeof document<"u";function S1(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function d0e(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&S1(e.default)}const bt=Object.assign;function Hd(e,t){const r={};for(const o in t){const s=t[o];r[o]=zr(s)?s.map(e):e(s)}return r}const la=()=>{},zr=Array.isArray;function u0(e,t){const r={};for(const o in e)r[o]=o in t?t[o]:e[o];return r}const _1=/#/g,h0e=/&/g,p0e=/\//g,g0e=/=/g,m0e=/\?/g,T1=/\+/g,v0e=/%5B/g,y0e=/%5D/g,C1=/%5E/g,b0e=/%60/g,E1=/%7B/g,w0e=/%7C/g,A1=/%7D/g,x0e=/%20/g;function Fp(e){return e==null?"":encodeURI(""+e).replace(w0e,"|").replace(v0e,"[").replace(y0e,"]")}function k0e(e){return Fp(e).replace(E1,"{").replace(A1,"}").replace(C1,"^")}function $h(e){return Fp(e).replace(T1,"%2B").replace(x0e,"+").replace(_1,"%23").replace(h0e,"%26").replace(b0e,"`").replace(E1,"{").replace(A1,"}").replace(C1,"^")}function S0e(e){return $h(e).replace(g0e,"%3D")}function _0e(e){return Fp(e).replace(_1,"%23").replace(m0e,"%3F")}function T0e(e){return _0e(e).replace(p0e,"%2F")}function Na(e){if(e==null)return null;try{return decodeURIComponent(""+e)}catch{}return""+e}const C0e=/\/$/,E0e=e=>e.replace(C0e,"");function Bd(e,t,r="/"){let o,s={},c="",f="";const d=t.indexOf("#");let h=t.indexOf("?");return h=d>=0&&h>d?-1:h,h>=0&&(o=t.slice(0,h),c=t.slice(h,d>0?d:t.length),s=e(c.slice(1))),d>=0&&(o=o||t.slice(0,d),f=t.slice(d,t.length)),o=N0e(o??t,r),{fullPath:o+c+f,path:o,query:s,hash:Na(f)}}function A0e(e,t){const r=t.query?e(t.query):"";return t.path+(r&&"?")+r+(t.hash||"")}function f0(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function L0e(e,t,r){const o=t.matched.length-1,s=r.matched.length-1;return o>-1&&o===s&&rl(t.matched[o],r.matched[s])&&L1(t.params,r.params)&&e(t.query)===e(r.query)&&t.hash===r.hash}function rl(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function L1(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const r in e)if(!M0e(e[r],t[r]))return!1;return!0}function M0e(e,t){return zr(e)?d0(e,t):zr(t)?d0(t,e):e===t}function d0(e,t){return zr(t)?e.length===t.length&&e.every((r,o)=>r===t[o]):e.length===1&&e[0]===t}function N0e(e,t){if(e.startsWith("/"))return e;if(!e)return t;const r=t.split("/"),o=e.split("/"),s=o[o.length-1];(s===".."||s===".")&&o.push("");let c=r.length-1,f,d;for(f=0;f<o.length;f++)if(d=o[f],d!==".")if(d==="..")c>1&&c--;else break;return r.slice(0,c).join("/")+"/"+o.slice(f).join("/")}const Gi={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};let Ih=(function(e){return e.pop="pop",e.push="push",e})({}),Wd=(function(e){return e.back="back",e.forward="forward",e.unknown="",e})({});function O0e(e){if(!e)if(Ls){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),E0e(e)}const P0e=/^[^#]+#/;function R0e(e,t){return e.replace(P0e,"#")+t}function $0e(e,t){const r=document.documentElement.getBoundingClientRect(),o=e.getBoundingClientRect();return{behavior:t.behavior,left:o.left-r.left-(t.left||0),top:o.top-r.top-(t.top||0)}}const gf=()=>({left:window.scrollX,top:window.scrollY});function I0e(e){let t;if("el"in e){const r=e.el,o=typeof r=="string"&&r.startsWith("#"),s=typeof r=="string"?o?document.getElementById(r.slice(1)):document.querySelector(r):r;if(!s)return;t=$0e(s,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function h0(e,t){return(history.state?history.state.position-t:-1)+e}const Dh=new Map;function D0e(e,t){Dh.set(e,t)}function z0e(e){const t=Dh.get(e);return Dh.delete(e),t}function F0e(e){return typeof e=="string"||e&&typeof e=="object"}function M1(e){return typeof e=="string"||typeof e=="symbol"}let qt=(function(e){return e[e.MATCHER_NOT_FOUND=1]="MATCHER_NOT_FOUND",e[e.NAVIGATION_GUARD_REDIRECT=2]="NAVIGATION_GUARD_REDIRECT",e[e.NAVIGATION_ABORTED=4]="NAVIGATION_ABORTED",e[e.NAVIGATION_CANCELLED=8]="NAVIGATION_CANCELLED",e[e.NAVIGATION_DUPLICATED=16]="NAVIGATION_DUPLICATED",e})({});const N1=Symbol("");qt.MATCHER_NOT_FOUND+"",qt.NAVIGATION_GUARD_REDIRECT+"",qt.NAVIGATION_ABORTED+"",qt.NAVIGATION_CANCELLED+"",qt.NAVIGATION_DUPLICATED+"";function il(e,t){return bt(new Error,{type:e,[N1]:!0},t)}function pi(e,t){return e instanceof Error&&N1 in e&&(t==null||!!(e.type&t))}const H0e=["params","query","hash"];function B0e(e){if(typeof e=="string")return e;if(e.path!=null)return e.path;const t={};for(const r of H0e)r in e&&(t[r]=e[r]);return JSON.stringify(t,null,2)}function W0e(e){const t={};if(e===""||e==="?")return t;const r=(e[0]==="?"?e.slice(1):e).split("&");for(let o=0;o<r.length;++o){const s=r[o].replace(T1," "),c=s.indexOf("="),f=Na(c<0?s:s.slice(0,c)),d=c<0?null:Na(s.slice(c+1));if(f in t){let h=t[f];zr(h)||(h=t[f]=[h]),h.push(d)}else t[f]=d}return t}function p0(e){let t="";for(let r in e){const o=e[r];if(r=S0e(r),o==null){o!==void 0&&(t+=(t.length?"&":"")+r);continue}(zr(o)?o.map(s=>s&&$h(s)):[o&&$h(o)]).forEach(s=>{s!==void 0&&(t+=(t.length?"&":"")+r,s!=null&&(t+="="+s))})}return t}function q0e(e){const t={};for(const r in e){const o=e[r];o!==void 0&&(t[r]=zr(o)?o.map(s=>s==null?null:""+s):o==null?o:""+o)}return t}const j0e=Symbol(""),g0=Symbol(""),Hp=Symbol(""),O1=Symbol(""),zh=Symbol("");function jl(){let e=[];function t(o){return e.push(o),()=>{const s=e.indexOf(o);s>-1&&e.splice(s,1)}}function r(){e=[]}return{add:t,list:()=>e.slice(),reset:r}}function no(e,t,r,o,s,c=f=>f()){const f=o&&(o.enterCallbacks[s]=o.enterCallbacks[s]||[]);return()=>new Promise((d,h)=>{const p=b=>{b===!1?h(il(qt.NAVIGATION_ABORTED,{from:r,to:t})):b instanceof Error?h(b):F0e(b)?h(il(qt.NAVIGATION_GUARD_REDIRECT,{from:t,to:b})):(f&&o.enterCallbacks[s]===f&&typeof b=="function"&&f.push(b),d())},g=c(()=>e.call(o&&o.instances[s],t,r,p));let v=Promise.resolve(g);e.length<3&&(v=v.then(p)),v.catch(b=>h(b))})}function qd(e,t,r,o,s=c=>c()){const c=[];for(const f of e)for(const d in f.components){let h=f.components[d];if(!(t!=="beforeRouteEnter"&&!f.instances[d]))if(S1(h)){const p=(h.__vccOpts||h)[t];p&&c.push(no(p,r,o,f,d,s))}else{let p=h();c.push(()=>p.then(g=>{if(!g)throw new Error(`Couldn't resolve component "${d}" at "${f.path}"`);const v=d0e(g)?g.default:g;f.mods[d]=g,f.components[d]=v;const b=(v.__vccOpts||v)[t];return b&&no(b,r,o,f,d,s)()}))}}return c}function U0e(e,t){const r=[],o=[],s=[],c=Math.max(t.matched.length,e.matched.length);for(let f=0;f<c;f++){const d=t.matched[f];d&&(e.matched.find(p=>rl(p,d))?o.push(d):r.push(d));const h=e.matched[f];h&&(t.matched.find(p=>rl(p,h))||s.push(h))}return[r,o,s]}/*!
54 * vue-router v4.6.3
55 * (c) 2025 Eduardo San Martin Morote
56 * @license MIT

Callers 2

L0eFunction · 0.70
k0Function · 0.70

Calls 2

keysMethod · 0.80
M0eFunction · 0.70

Tested by

no test coverage detected