PageSourceSearch

https://planetscale.com/assets/lib-BaoXT94S.js

js planetscale.com collected 2026-10-02 02:12:04 UTC 11,332 bytes, 2 lines download raw bytes

1import{s as A,c as D,r as s,d as C,e as X,N as P,p as re,f as oe,g as ie,j as z,h as _,D as Q,i as le,k as U,A as Z,V as se,l as H,m as G,n as ue,o as ce,q as K,a as fe}from"./components-1Wmdhof4.js";import{u as de,m as me,P as he,F as pe,e as j}from"./errorBoundaries-DwrrKc4H.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"cc9458776555aa058453879956cede1e33584743"};var n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2e2df2c5-b739-4e64-a4bf-6ac3761a5c57",e._sentryDebugIdIdentifier="sentry-dbid-2e2df2c5-b739-4e64-a4bf-6ac3761a5c57")}catch{}})();const F="application/x-www-form-urlencoded";function M(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function we(e){return M(e)&&e.tagName.toLowerCase()==="button"}function ye(e){return M(e)&&e.tagName.toLowerCase()==="form"}function Se(e){return M(e)&&e.tagName.toLowerCase()==="input"}function be(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ge(e,n){return e.button===0&&(!n||n==="_self")&&!be(e)}function V(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let a=e[t];return n.concat(Array.isArray(a)?a.map(i=>[t,i]):[[t,a]])},[]))}function Re(e,n){let t=V(e);return n&&n.forEach((a,i)=>{t.has(i)||n.getAll(i).forEach(o=>{t.append(i,o)})}),t}let I=null;function ve(){if(I===null)try{new FormData(document.createElement("form"),0),I=!1}catch{I=!0}return I}const Ee=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function O(e){return e!=null&&!Ee.has(e)?(D(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${F}"`),null):e}function Le(e,n){let t,a,i,o,r;if(ye(e)){let u=e.getAttribute("action");a=u?A(u,n):null,t=e.getAttribute("method")||"get",i=O(e.getAttribute("enctype"))||F,o=new FormData(e)}else if(we(e)||Se(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let c=e.getAttribute("formaction")||u.getAttribute("action");if(a=c?A(c,n):null,t=e.getAttribute("formmethod")||u.getAttribute("method")||"get",i=O(e.getAttribute("formenctype"))||O(u.getAttribute("enctype"))||F,o=new FormData(u,e),!ve()){let{name:l,type:f,value:d}=e;if(f==="image"){let y=l?`${l}.`:"";o.append(`${y}x`,"0"),o.append(`${y}y`,"0")}else l&&o.append(l,d)}}else{if(M(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t="get",a=null,i=F,r=e}return o&&i==="text/plain"&&(r=o,o=void 0),{action:a,method:t.toLowerCase(),encType:i,formData:o,body:r}}const xe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{xe&&(window.__reactRouterVersion="8.3.0")}catch{}const ee=s.forwardRef(function({onClick:n,discover:t="render",prefetch:a="none",relative:i,reloadDocument:o,replace:r,mask:u,state:c,target:l,to:f,preventScrollReset:d,viewTransition:y,defaultShouldRevalidate:p,...S},b){let{basename:g,navigator:h,useTransitions:R}=s.useContext(P),m=typeof f=="string"&&Z.test(f),v=re(f,g);f=v.to;let w=oe(f,{relative:i}),E=C(),L=null;if(u){let x=ie(u,[],E.mask?E.mask.pathname:"/",!0);g!=="/"&&(x.pathname=x.pathname==="/"?g:z([g,x.pathname])),L=h.createHref(x)}let[T,k,$]=de(a,S),ne=ke(f,{replace:r,mask:u,state:c,target:l,preventScrollReset:d,relative:i,viewTransition:y,defaultShouldRevalidate:p,useTransitions:R});function ae(x){n&&n(x),x.defaultPrevented||ne(x)}let J=!(v.isExternal||o),q=s.createElement("a",{...S,...$,href:(J?L:void 0)||v.absoluteURL||w,onClick:J?ae:n,ref:me(b,k),target:l,"data-discover":!m&&t==="render"?"true":void 0});return T&&!m?s.createElement(s.Fragment,null,q,s.createElement(he,{page:w})):q});ee.displayName="Link";const Ce=s.forwardRef(function({"aria-current":n="page",caseSensitive:t=!1,className:a="",end:i=!1,style:o,to:r,viewTransition:u,children:c,...l},f){let d=_(r,{relative:l.relative}),y=C(),p=s.useContext(Q),{navigator:S,basename:b}=s.useContext(P),g=p!=null&&Me(d)&&u===!0,h=S.encodeLocation?S.encodeLocation(d).pathname:d.pathname,R=y.pathname,m=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(R=R.toLowerCase(),m=m?m.toLowerCase():null,h=h.toLowerCase()),m&&b&&(m=A(m,b)||m);const v=h!=="/"&&h.endsWith("/")?h.length-1:h.length;let w=R===h||!i&&R.startsWith(h)&&R.charAt(v)==="/",E=m!=null&&(m===h||!i&&m.startsWith(h)&&m.charAt(v)==="/"),L={isActive:w,isPending:E,isTransitioning:g},T=w?n:void 0,k;typeof a=="function"?k=a(L):k=[a,w?"active":null,E?"pending":null,g?"transitioning":null].filter(
1Boolean).join(" ");let $=typeof o=="function"?o(L):o;return s.createElement(ee,{...l,"aria-current":T,className:k,ref:f,style:$,to:r,viewTransition:u},typeof c=="function"?c(L):c)});Ce.displayName="NavLink";const Pe=s.forwardRef(({discover:e="render",fetcherKey:n,navigate:t,reloadDocument:a,replace:i,state:o,method:r="get",action:u,onSubmit:c,relative:l,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:y,...p},S)=>{let{useTransitions:b}=s.useContext(P),g=Fe(),h=De(u,{relative:l}),R=r.toLowerCase()==="get"?"get":"post",m=typeof u=="string"&&Z.test(u),v=w=>{if(c&&c(w),w.defaultPrevented)return;w.preventDefault();let E=w.nativeEvent.submitter,L=E?.getAttribute("formmethod")||r,T=()=>g(E||w.currentTarget,{fetcherKey:n,method:L,navigate:t,replace:i,state:o,relative:l,preventScrollReset:f,viewTransition:d,defaultShouldRevalidate:y});b&&t!==!1?s.startTransition(()=>T()):T()};return s.createElement("form",{ref:S,method:R,action:h,onSubmit:a?c:v,...p,"data-discover":!m&&e==="render"?"true":void 0})});Pe.displayName="Form";function Te({getKey:e,storageKey:n,...t}){let a=s.useContext(pe),{basename:i}=s.useContext(P),o=C(),r=K();_e({getKey:e,storageKey:n});let u=s.useMemo(()=>{if(!a||!e)return null;let l=W(o,r,i,e);return l!==o.key?l:null},[]);if(!a||a.isSpaMode)return null;let c=((l,f)=>{if(!window.history.state||!window.history.state.key){let d=Math.random().toString(32).slice(2);window.history.replaceState({key:d},"")}try{let d=JSON.parse(sessionStorage.getItem(l)||"{}")[f||window.history.state.key];typeof d=="number"&&window.scrollTo(0,d)}catch(d){console.error(d),sessionStorage.removeItem(l)}}).toString();return t.nonce==null&&a?.nonce&&(t.nonce=a.nonce),s.createElement("script",{...t,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${j(JSON.stringify(n||B))}, ${j(JSON.stringify(u))})`}})}Te.displayName="ScrollRestoration";function te(e){return`${e} must be used within a data router.  See https://reactrouter.com/en/main/routers/picking-a-router.`}function Y(e){let n=s.useContext(ce);return H(n,te(e)),n}function Ae(e){let n=s.useContext(Q);return H(n,te(e)),n}function ke(e,{target:n,replace:t,mask:a,state:i,preventScrollReset:o,relative:r,viewTransition:u,defaultShouldRevalidate:c,useTransitions:l}={}){let f=X(),d=C(),y=_(e,{relative:r});return s.useCallback(p=>{if(ge(p,n)){p.preventDefault();let S=t!==void 0?t:U(d)===U(y),b=()=>f(e,{replace:S,mask:a,state:i,preventScrollReset:o,relative:r,viewTransition:u,defaultShouldRevalidate:c});l?s.startTransition(()=>b()):b()}},[d,f,y,t,a,i,n,e,o,r,u,c,l])}function Ue(e){D(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let n=s.useRef(V(e)),t=s.useRef(!1),a=C(),i=s.useMemo(()=>Re(a.search,t.current?null:n.current),[a.search]),o=X();return[i,s.useCallback((r,u)=>{const c=V(typeof r=="function"?r(new URLSearchParams(i)):r);t.current=!0,o("?"+c,u)},[o,i])]}let Ie=0,Ne=()=>`__${String(++Ie)}__`;function Fe(){let{router:e}=Y("useSubmit"),{basename:n}=s.useContext(P),t=le(),a=e.fetch,i=e.navigate;return s.useCallback(async(o,r={})=>{let{action:u,method:c,encType:l,formData:f,body:d}=Le(o,n);r.navigate===!1?await a(r.fetcherKey||Ne(),t,r.action||u,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:f,body:d,formMethod:r.method||c,formEncType:r.encType||l,flushSync:r.flushSync}):await i(r.action||u,{defaultShouldRevalidate:r.defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:f,body:d,formMethod:r.method||c,formEncType:r.encType||l,replace:r.replace,state:r.state,fromRouteId:t,flushSync:r.flushSync,viewTransition:r.viewTransition})},[a,i,n,t])}function De(e,{relative:n}={}){let{basename:t}=s.useContext(P),a=s.useContext(ue);H(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),o={..._(e||".",{relative:n})},r=C();if(e==null){o.search=r.search;let u=new URLSearchParams(o.search),c=u.getAll("index");if(c.some(l=>l==="")){u.delete("index"),c.filter(f=>f).forEach(f=>u.append("index",f));let l=u.toString();o.search=l?`?${l}`:""}}return(!e||e===".")&&i.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),t!=="/"&&(o.pathname=o.pathname==="/"?t:z([t,o.pathname])),U(o)}const B="react-router-scroll-positions";let N={};function W(e,n,t,a){let i=null;return a&&(t!=="/"?i=a({...e,pathname:A(e.pathname,t)||e.pathname}
1,n):i=a(e,n)),i==null&&(i=e.key),i}function _e({getKey:e,storageKey:n}={}){let{router:t}=Y("useScrollRestoration"),{restoreScrollPosition:a,preventScrollReset:i}=Ae("useScrollRestoration"),{basename:o}=s.useContext(P),r=C(),u=K(),c=fe();s.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),He(s.useCallback(()=>{if(c.state==="idle"){let l=W(r,u,o,e);N[l]=window.scrollY}try{sessionStorage.setItem(n||B,JSON.stringify(N))}catch(l){D(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${l}).`)}window.history.scrollRestoration="auto"},[c.state,e,o,r,u,n])),typeof document<"u"&&(s.useLayoutEffect(()=>{try{let l=sessionStorage.getItem(n||B);l&&(N=JSON.parse(l))}catch{}},[n]),s.useLayoutEffect(()=>{let l=t?.enableScrollRestoration(N,()=>window.scrollY,e?(f,d)=>W(f,d,o,e):void 0);return()=>l&&l()},[t,o,e]),s.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}try{if(r.hash){let l=document.getElementById(decodeURIComponent(r.hash.slice(1)));if(l){l.scrollIntoView();return}}}catch{D(!1,`"${r.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[r,a,i]))}function He(e,n){let{capture:t}={};s.useEffect(()=>{let a=t!=null?{capture:t}:void 0;return window.addEventListener("pagehide",e,a),()=>{window.removeEventListener("pagehide",e,a)}},[e,t])}function Me(e,{relative:n}={}){let t=s.useContext(se);H(t!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`.  Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Y("useViewTransitionState"),i=_(e,{relative:n});if(!t.isTransitioning)return!1;let o=A(t.currentLocation.pathname,a)||t.currentLocation.pathname,r=A(t.nextLocation.pathname,a)||t.nextLocation.pathname;return G(i.pathname,r)!=null||G(i.pathname,o)!=null}export{Pe as F,ee as L,Ce as N,Te as S,Fe as a,Ue as u};
2//# sourceMappingURL=lib-BaoXT94S.js.map

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.