PageSourceSearch

https://websim.com/assets/error-boundary-BmwtLVUC.js

js websim.com collected 2026-09-25 00:15:58 UTC 3,942 bytes, 29 lines download raw bytes

1import{r as i,j as t}from"./jsx-runtime-CAOzMBF_.js";import{b as g}from"./index-BAqKqkA_.js";import{L as u}from"./components-DJe5N028.js";/**
2 * @license lucide-react v0.456.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const h=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),x=(...e)=>e.filter((r,o,s)=>!!r&&r.trim()!==""&&s.indexOf(r)===o).join(" ").trim();/**
7 * @license lucide-react v0.456.0 - ISC
8 *
9 * This source code is licensed under the ISC license.
10 * See the LICENSE file in the root directory of this source tree.
11 */var f={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
12 * @license lucide-react v0.456.0 - ISC
13 *
14 * This source code is licensed under the ISC license.
15 * See the LICENSE file in the root directory of this source tree.
16 */const y=i.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:o=2,absoluteStrokeWidth:s,className:a="",children:n,iconNode:c,...l},m)=>i.createElement("svg",{ref:m,...f,width:r,height:r,stroke:e,strokeWidth:s?Number(o)*24/Number(r):o,className:x("lucide",a),...l},[...c.map(([d,p])=>i.createElement(d,p)),...Array.isArray(n)?n:[n]]));/**
17 * @license lucide-react v0.456.0 - ISC
18 *
19 * This source code is licensed under the ISC license.
20 * See the LICENSE file in the root directory of this source tree.
21 */const k=(e,r)=>{const o=i.forwardRef(({className:s,...a},n)=>i.createElement(y,{ref:n,iconNode:r,className:x(`lucide-${h(e)}`,s),...a}));return o.displayName=`${e}`,o};/**
22 * @license lucide-react v0.456.0 - ISC
23 *
24 * This source code is licensed under the ISC license.
25 * See the LICENSE file in the root directory of this source tree.
26 */const w=k("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);function b(e){return typeof e=="object"&&e!==null&&"status"in e&&typeof e.status=="number"}function j(e){if(b(e))try{const{status:r,body:{error:{name:o="Unknown error",message:s="Unknown error",stack:a=""}={}}={}}=e;return{status:r,name:o,message:s,stack:a}}catch{return{name:e.name||"Unknown error",message:e.message||"Unknown error",stack:e.stack||""}}return e instanceof Error?{name:e.name,message:e.message,stack:e.stack??""}:{name:"Unknown error",message:"Unknown error",stack:""}}function C(){const[e,r]=i.useState(!1),o=g(),{status:s,name:a,message:n,stack:c}=j(o),l=s===404;console.log("error-boundary",s,a,n,c);const m=()=>{const d=`${s?`${s}: `:""}${a}
27    ${n}
28    ${c?`
29`+c:""}`;navigator.clipboard.writeText(d),r(!0),setTimeout(()=>r(!1),2e3)};return t.jsxs("div",{className:"p-8 max-w-[600px] mx-auto font-system text-gray-800 text-center bg-white rounded-lg",children:[t.jsx("h1",{className:"text-2xl font-bold",children:"Oops!"}),t.jsx("p",{className:"text-lg",children:l?"Sorry, we couldn't find that page.":"Sorry, an unexpected error has occurred."}),t.jsxs("p",{className:"mt-2 mb-4 text-lg",children:["Go back"," ",t.jsx(u,{className:"underline",to:"https://websim.com",children:"Home"})," ","or"," ",t.jsx(u,{className:"underline",to:"https://discord.gg/websim",children:"visit Discord"})]}),!l&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"relative",children:[t.jsxs("code",{className:"block p-2 rounded bg-gray-800 text-gray-200 text-left",children:[s?`${s}: `:"",n,c&&t.jsxs("pre",{className:"overflow-auto",children:[t.jsx("div",{className:"border-t border-gray-600 my-2"}),c]})]}),t.jsx("button",{onClick:m,className:"absolute top-2 right-2 p-1 text-gray-400 hover:text-gray-200",title:"Copy error message",children:t.jsx(w,{size:16})})]}),e&&t.jsx("p",{className:"text-sm text-gray-600 mt-2",children:"Error copied to clipboard"})]})]})}function $(){return t.jsx(C,{})}export{w as C,$ as D,k as c};

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.