PageSourceSearch

https://fieldnotes.dadbody.com/assets/preload-helper-DV2e-z1l.js

js dadbody.com collected 2026-10-09 18:05:14 UTC 4,942 bytes, 1 lines download raw bytes

1import{i as e,t}from"./jsx-runtime-Cx0BB4qO.js";import{r as n}from"./useRouter-BcEm5DWO.js";import{i as r,t as i}from"./invariant-CgFvOqN2.js";import{c as a,n as o,s,t as c,x as l}from"./link-DY6jQ3bG.js";import{t as u}from"./root-DLTE-HSj.js";import{t as d}from"./useMatch-ibKX4emw.js";import{t as f}from"./useNavigate-B7ZVLhbX.js";var p=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e,this._branch=void 0;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=u:this.parentRoute||i();let r=n?u:t?.path;r&&r!==`/`&&(r=s(r));let c=t?.id||r,l=n?u:o((this.parentRoute.id===`__root__`?``:this.parentRoute.id)+`/`+(c??``));r===`__root__`&&(r=`/`);let d=l===`__root__`?`/`:r===void 0?this.parentRoute.fullPath:o(this.parentRoute.fullPath+`/`+r);this._path=r,this._id=l,this._fullPath=d,this._to=a(d)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>r({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},m=class extends p{constructor(e){super(e)}},h=e(n(),1),g=h.use,_=h.useLayoutEffect;function v(e){return d({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function y(e){let{select:t,...n}=e;return d({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function b(e){return d({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function x(e){return d({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function S(e){return d({...e,select:t=>e.select?e.select(t.context):t.context})}var C=t(),w=class extends p{constructor(e){super(e),this.useMatch=e=>d({...e,from:this.id}),this.useRouteContext=e=>S({...e,from:this.id}),this.useSearch=e=>x({...e,from:this.id}),this.useParams=e=>b({...e,from:this.id}),this.useLoaderDeps=e=>y({...e,from:this.id}),this.useLoaderData=e=>v({...e,from:this.id}),this.useNavigate=()=>f({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,C.jsx)(c,{ref:t,from:this.fullPath,...e}))}};function T(e){return new w(e)}function E(){return e=>O(e)}var D=class extends m{constructor(e){super(e),this.useMatch=e=>d({...e,from:this.id}),this.useRouteContext=e=>S({...e,from:this.id}),this.useSearch=e=>x({...e,from:this.id}),this.useParams=e=>b({...e,from:this.id}),this.useLoaderDeps=e=>y({...e,from:this.id}),this.useLoaderData=e=>v({...e,from:this.id}),this.useNavigate=()=>f({from:this.fullPath}),this.Link=h.forwardRef((e,t)=>(0,C.jsx)(c,{ref:t,from:this.fullPath,...e}))}};function O(e){return new D(e)}function k(e){return e=>{let t=T(e);return t.isRoot=!1,t}}function A(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(l(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r)if(g)g(a());else throw a();return h.createElement(r,e)};return o.preload=a,o}var j=`modulepreload`,M=function(e){return`/`+e},N={},P=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=M(t,n),t=s(t),t in N)return;N[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:j,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n
vendor: 392 bytes, line 1
1)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{g as a,E as i,A as n,_ as o,k as r,P as t};

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.