PageSourceSearch

https://reelabilities.org/_next/static/chunks/app/not-found-b095b808bb30bbd1.js

js reelabilities.org collected 2026-10-02 03:40:50 UTC 4,733 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4345],{3042:(e,a,t)=>{"use strict";t.d(a,{default:()=>l});var s=t(5155),n=t(2115),i=t(2619),r=t.n(i);let l=()=>{let[e,a]=(0,n.useState)("loading"),[t,i]=(0,n.useState)(null),l=(0,n.useCallback)(async(e,a,t)=>{try{await fetch("/api/record-redirect",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({fromPath:e,toPath:a,confidence:t})})}catch(e){console.error("Failed to record redirect:",e)}},[]),o=(0,n.useCallback)((e,a)=>{l(window.location.pathname+window.location.search,e,a)},[l]);return(0,n.useEffect)(()=>{(async()=>{let e=window.location.pathname+window.location.search;try{let t=await fetch("/api/suggest-page",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:e})});if(!t.ok)return void a("error");let s=await t.json();if(i(s),s.autoRedirect&&s.suggestedPath){a("redirecting"),window.location.replace(s.suggestedPath);return}a(s.found?"found":"not-found")}catch(e){a("error")}})()},[]),(0,s.jsx)("main",{id:"main-content",className:"min-h-screen flex items-center justify-center bg-base-200 p-4",role:"main","aria-labelledby":"not-found-heading",children:(0,s.jsx)("div",{className:"card bg-base-100 shadow-xl max-w-lg w-full",children:(0,s.jsxs)("div",{className:"card-body text-center",children:[(0,s.jsx)("h1",{id:"not-found-heading",className:"text-6xl font-bold text-primary mb-4",children:"404"}),"loading"===e&&(0,s.jsxs)("div",{role:"status","aria-live":"polite",children:[(0,s.jsx)("span",{className:"loading loading-spinner loading-lg text-primary","aria-hidden":"true"}),(0,s.jsx)("p",{className:"mt-4 text-base-content/70",children:"Looking for similar pages..."})]}),"redirecting"===e&&(0,s.jsxs)("div",{role:"status","aria-live":"polite",children:[(0,s.jsx)("span",{className:"loading loading-spinner loading-lg text-primary","aria-hidden":"true"}),(0,s.jsx)("p",{className:"mt-4 text-base-content/70",children:"Redirecting you to the right page..."})]}),"found"===e&&t&&(0,s.jsxs)("div",{"aria-live":"polite",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"Page Not Found"}),(0,s.jsx)("p",{className:"text-base-content/70 mb-6",children:(e=>{switch(e){case"high":return"We found a page that closely matches what you were looking for:";case"medium":return"We found a page that might be what you were looking for:";case"low":return"This page might be related to what you were looking for:";default:return"You might be looking for:"}})(t.confidenceLevel)}),(0,s.jsxs)("div",{className:"bg-base-200 rounded-lg p-4 mb-6",children:[(0,s.jsx)(r(),{href:t.suggestedPath||"/",className:"link link-primary text-lg font-medium hover:link-hover",onClick:()=>o(t.suggestedPath||"/",t.confidence||0),children:t.suggestedPath}),((e,a)=>{let t="badge badge-sm ml-2";switch(e){case"high":return(0,s.jsxs)("span",{className:"".concat(t," badge-success"),children:[a,"% match"]});case"medium":return(0,s.jsxs)("span",{className:"".concat(t," badge-warning"),children:[a,"% match"]});case"low":return(0,s.jsxs)("span",{className:"".concat(t," badge-error"),children:[a,"% match"]});default:return null}})(t.confidenceLevel,t.confidence)]}),"high"!==t.confidenceLevel&&(0,s.jsx)("p",{className:"text-sm text-base-content/50 mb-4",children:"Not what you were looking for? Try browsing from the homepage."}),(0,s.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[(0,s.jsx)(r(),{href:t.suggestedPath||"/",className:"btn btn-primary",onClick:()=>o(t.suggestedPath||"/",t.confidence||0),children:"Go to Suggested Page"}),(0,s.jsx)(r(),{href:"/",className:"btn btn-outline",children:"Go to Homepage"})]}),t.alternatives&&t.alternatives.length>0&&(0,s.jsxs)("div",{className:"mt-6 pt-4 border-t border-base-300",children:[(0,s.jsx)("p",{className:"text-sm text-base-content/70 mb-2",children:"Other suggestions:"}),(0,s.jsx)("ul",{className:"space-y-1",children:t.alternatives.slice(0,3).map((e,a)=>(0,s.jsxs)("li",{children:[(0,s.jsx)(r(),{href:e.path,className:"link link-secondary text-sm",onClick:()=>o(e.path,e.confidence),children:e.path}),(0,s.jsxs)("span",{className:"text-xs text-base-content/50 ml-2",children:["(",e.confidence,"%)"]})]},a))})]})]}),("not-found"===e||"error"===e)&&(0,s.jsxs)("div",{"aria-live":"polite",children:[(0,s.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"Page Not Found"}),(0,s.jsx)("p",{className:"text-base-content/70 mb-6",children:"Sorry, we couldn't find the page you were looking for."}),(0,s.jsx)(r(),{href:"/",className:"btn btn-primary",children:"Go to Homepage"})]})]})})})}},3806:(e,a,t)=>{Promise.resolve().then(t.bind(t,3042))}},e=>{e.O(0,[2619,8441,1255,7358],()=>e(e.s=3806)),_N_E=e.O()}]);

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.