PageSourceSearch

https://bbcc.ai/build/assets/PageView-CKpyTime.js

js bbcc.ai collected 2026-10-05 12:12:57 UTC 4,480 bytes, 1 lines download raw bytes

1import{u as F,r as s,j as r,L as T,H as _}from"./app-DP13319Q.js";import{D as A}from"./DraggableMenu-Bk7Spryo.js";import{M as R}from"./react-tooltip.min-DW3XhwOj.js";import{C as D}from"./circle-alert-CZkNghCu.js";import{A as W}from"./arrow-left-BDpJVyQf.js";/* empty css            */import"./index-CtyZ6W6U.js";import"./index-DQkUn08L.js";import"./createLucideIcon-BZKkeQZf.js";function Z({page:N,auth:k={user:null},tooltips:x={}}){const{page:y}=F(),t=N||(y==null?void 0:y.page),w=s.useRef(null),[$,C]=s.useState(null),[P,M]=s.useState(!1),[q,U]=s.useState(!1),[b,H]=s.useState(""),[B,E]=s.useState(!1),v=s.useCallback((e,i,S)=>{let u=(x==null?void 0:x[e])||i;if(S)for(const[n,d]of Object.entries(S))u=u.replace(new RegExp(`{${n}}`,"g"),String(d));return u},[x]);return s.useEffect(()=>{t!=null&&t.slug&&H(`${window.location.origin}/page/${t.slug}`)},[t==null?void 0:t.slug]),s.useCallback(async()=>{if(b)try{await navigator.clipboard.writeText(b),M(!0),setTimeout(()=>M(!1),2e3)}catch(e){console.error("Failed to copy:",e)}},[b]),s.useCallback(()=>{document.fullscreenElement?(document.exitFullscreen(),E(!1)):(document.documentElement.requestFullscreen(),E(!0))},[]),s.useEffect(()=>{const e=()=>{E(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",e),()=>document.removeEventListener("fullscreenchange",e)},[]),s.useEffect(()=>{if(!(!(t!=null&&t.restoredHtml)||!w.current)){C(null);try{const e=w.current,i=t.restoredHtml;if(e.innerHTML="",i.trim().toLowerCase().startsWith("<!doctype")||i.trim().toLowerCase().startsWith("<html")){const u=i.match(/<head[^>]*>([\s\S]*?)<\/head>/i);if(u){const l=u[1],g=/<style[^>]*>([\s\S]*?)<\/style>/gi;let o;for(;(o=g.exec(l))!==null;){const c=document.createElement("style");c.textContent=o[1],e.appendChild(c)}const a=/<link[^>]*rel=["']stylesheet["'][^>]*>/gi;let f;for(;(f=a.exec(l))!==null;){const c=document.createElement("div");c.innerHTML=f[0];const m=c.firstChild;m&&e.appendChild(m)}const j=/<meta[^>]*>/gi;let p;for(;(p=j.exec(l))!==null;){const c=document.createElement("div");c.innerHTML=p[0];const m=c.firstChild;m&&e.appendChild(m)}const L=l.match(/<base[^>]*>/i);if(L){const c=document.createElement("div");c.innerHTML=L[0];const m=c.firstChild;m&&e.appendChild(m)}}const n=i.match(/<body[^>]*>([\s\S]*?)<\/body>/i),d=n?n[1]:i,h=document.createElement("div");h.innerHTML=d,e.appendChild(h),(async()=>{var g;const l=h.querySelectorAll("script");for(const o of Array.from(l)){const a=document.createElement("script");Array.from(o.attributes).forEach(f=>{a.setAttribute(f.name,f.value)}),o.src?await new Promise((f,j)=>{var p;a.onload=f,a.onerror=j,a.src=o.src,(p=o.parentNode)==null||p.replaceChild(a,o)}):(a.textContent=o.textContent,(g=o.parentNode)==null||g.replaceChild(a,o))}})().catch(l=>{console.error("Script execution error:",l),C(`Script error: ${l.message}`)})}else e.innerHTML=i,e.querySelectorAll("script").forEach(n=>{var h;const d=document.createElement("script");n.type&&(d.type=n.type),n.src?d.src=n.src:d.textContent=n.textContent,(h=n.parentNode)==null||h.replaceChild(d,n)})}catch(e){console.error("HTML render error:",e),C(e instanceof Error?e.message:"Unknown error occurred")}}},[t==null?void 0:t.restoredHtml]),t?r.jsxs(r.Fragment,{children:[r.jsx(_,{title:`${t.title}`}),r.jsx("div",{ref:w,className:"w-full min-h-screen"})]}):r.jsxs(r.Fragment,{children:[r.jsx(R,{id:"pageview-tooltip",place:"top",className:"!bg-gray-900 !text-white !text-xs !px-3 !py-2 !rounded-lg",effect:"solid"}),r.jsx(A,{auth:k}),r.jsx("div",{className:"min-h-screen bg-gradient-to-br from-slate-50 to-gray-100 flex flex-col items-center justify-center px-4",children:r.jsxs("div",{className:"text-center max-w-md",children:[r.jsx("div",{className:"w-24 h-24 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-6",children:r.jsx(D,{className:"w-12 h-12 text-red-500"})}),r.jsx("h1",{className:"text-2xl font-bold text-gray-900 mb-2",children:v("pageview_not_found","Page Not Found")}),r.jsx("p",{className:"text-gray-500 mb-6",children:v("pageview_not_found_desc","The page you're looking for doesn't exist or has been removed.")}),r.jsxs(T,{href:"/",className:"inline-flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-green-500 to-emerald-600 text-white rounded-xl font-medium hover:from-green-600 hover:to-emerald-700 transition-all duration-200 shadow-md",children:[r.jsx(W,{className:"w-4 h-4"}),v("pageview_back_home","Back to Home")]})]})})]})}export{Z as default};

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.