1function k(i){return typeof i=="string"?i:i instanceof URL?i.href:i&&typeof i.url=="string"?i.url:String(i??"")}if(typeof window<"u"){let i=function(t){if(!t.shadowRoot)return;const n=t.shadowRoot.querySelector(".backdrop");if(n){const e=n.outerHTML,o=new DOMParser().parseFromString(e,"text/html"),s=o.querySelector(".message-body"),u=o.querySelector(".file"),a=s?s.textContent.trim():"",c=u?u.textContent.trim():"",l=a+(c?` File:${c}`:"");window.parent.postMessage({type:"horizons-vite-error",error:l},"*")}},y=function(t){if(typeof t!="string")return null;for(const n of t.split(` 2`)){if(!M.test(n)||n.includes("/node_modules/"))continue;const e=n.match(C);if(e)return e[1]}return null},R=function(t){if(t instanceof Error)return t.name&&t.name!=="Error"?`${t.name}: ${t.message}`:t.message||t.name||"Error";if(!t||typeof t!="object")return t?String(t):null;const{status:n,statusText:e,data:r,message:o}=t;if(typeof n=="number"){if(n<500)return null;const s=typeof r=="string"&&r?`: ${r}`:"";return`${n} ${e||"Server Error"}${s}`}if(typeof o=="string"&&o)return o;try{return JSON.stringify(t)}catch{return String(t)}},_=function(t,n){const e=R(n);if(!e)return null;const r=n instanceof Error?y(n.stack):null,o=r?`${t}, ${r}`:t;return`SSR error on ${window.location.pathname} (${o}): ${e}`},d=function(t){if(!t.errors){f=null;return}const n=Object.entries(t.errors).map(([e,r])=>_(e,r)).filter(e=>!!e).join(` 3`);if(!n){f=null;return}n!==f&&(f=n,window.parent.postMessage({type:"horizons-ssr-error",error:n},"*"))},m=function(){const t=window.__reactRouterDataRouter;return t?(d(t.state),t.subscribe(d),!0):!1},T=function(t){const n=t.match(b);if(!n)return null;const[,e,r]=n,o=`:${e}:${r}`,s=t.lastIndexOf(o);if(s===-1)return null;const a=t.substring(0,s).replace(v,"").trim();if(!a)return null;try{const c=new URL(a).pathname;return`${c.replace(g,"")||c}:${e}:${r}`}catch{return`${a.replace(g,"")||a}:${e}:${r}`}},h=function(t,n=0){return!t||typeof t!="string"?null:t.split(` 4`).slice(1).map(o=>T(o.replace(/\r$/,""))).filter(Boolean)[n]??null},w=function(t,n=1){let e="",r=null;for(let o=0;o<t.length;o++){const s=t[o];if(s instanceof Error){r=h(s.stack,0),e=`${s.name}: ${s.message}`,r&&(e=`${e} at ${r}`);break}}if(!e){e=t.map(s=>typeof s=="object"?JSON.stringify(s):String(s)).join(" ");const o=new Error().stack;r=h(o,n),r&&(e=`${e} at ${r}`)}return e},$=function(t,n){return P.some(([e,r])=>e.test(t)&&(!r||r.test(n)))},p=function(t){return t==null?!1:typeof t=="string"?t.startsWith("validation_"):Array.isArray(t)?t.some(p):typeof t=="object"?Object.values(t).some(p):!1},S=function(t,n){if(!I.test(t))return!1;try{return p(JSON.parse(n))}catch{return x.test(n)}};new MutationObserver(t=>{for(const n of t)for(const e of n.addedNodes)e.nodeType===Node.ELEMENT_NODE&&(e.tagName?.toLowerCase()==="vite-error-overlay"||e.classList?.contains("backdrop"))&&i(e)}).observe(document.documentElement,{childList:!0,subtree:!0}),window.onerror=(t,n,e,r,o)=>{const s=o?JSON.stringify({name:o.name,message:o.message,stack:o.stack,source:n,lineno:e,colno:r}):null;window.parent.postMessage({type:"horizons-runtime-error",message:t,error:s},"*")};const N=100,O=2e4,A=console.warn;let f=null;const M=/^\s*at\s/,C=/\/(src\/[^\s):]+:\d+:\d+)/;if(!m()){const t=Date.now(),n=setInterval(()=>{if(m()){clearInterval(n);return}Date.now()-t>O&&(clearInterval(n),A("[horizons-runtime] React Router data router never appeared, SSR errors will not be reported."))},N)}const L=console.error,b=/:(\d+):(\d+)\)?\s*$/,v=/^\s*at\s+(?:async\s+)?(?:.*?\s+)?\(?/,g=/^\//;console.error=function(...t){L.apply(console,t),window.parent.postMessage({type:"horizons-console-error",error:w(t,1)},"*")};const F=console.warn;console.warn=function(...t){F.apply(console,t),window.parent.postMessage({type:"horizons-console-warn",warning:w(t,1)},"*")};const P=[[/hcgi\/platform\/api\/collections\/.*auth-with-password.*/i,/Failed to authenticate/i],[/hcgi\/api\//i,/Insufficient credits/i],[/hcgi\/api\//i,/INTEGRATION_NOT_CONFIGURED/i]],I=/hcgi\/platform\//i,x=/validation_/,E=window.fetch;window.fetch=function(...t){const n=k(t[0]);return n.startsWith("ws:")||n.startsWith("wss:")?E.apply(this,t):E.apply(this,t).then(async e=>{const r=e.headers.get("Content-Type")||"",o=r.includes("text/html")||r.includes("application/xhtml+xml"),s=e.type==="opaque";if(!e.ok&&!o&&!s){const a=await e.clone().text(),c=e.url,l=`Fetch error from ${c}: ${a}`;$(c,a)?console.info(l):S(c,a)?console.warn(l):console.error(l)}return e}).catch(e=>{throw n.match(/\.html?$/i)||(e?.name==="AbortError"?console.info(e):console.error(e)),e})},window.navigation&&window.self!==window.top&&window.navigation.addEventListener("navigate",t=>{const n=t.destination.url;
4try{const r=new URL(n).origin,o=window.location.origin;if(r===o)return}catch{return}window.parent.postMessage({type:"horizons-navigation-error",url:n},"*")})}
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.