PageSourceSearch

https://www.kidzfun.art/js/errorHandler.min.js?v=1790599672382

js kidzfun.art collected 2026-10-02 15:05:19 UTC 5,318 bytes, 8 lines download raw bytes

1function R(f){return typeof process!=="undefined"?process.env[f]:undefined}function C(){try{if(typeof location!=="undefined"&&location){return location.host||null}}catch(f){}return null}function $(){const f=C();if(f!==null){return f.indexOf("localhost:")>-1||f.indexOf("127.0.0.1:")>-1||f.indexOf("192.168.")>-1}return R("NODE_ENV")==="development"}function S(f){const J=f.replace(/^https?:\/\//,"");const G=J.split("/").map((O)=>{const U=O.indexOf("?");if(U>-1){O=O.substring(0,U)}return O.toLowerCase()});const T=G.findIndex((O)=>O.length===2&&/^[a-z]{2}$/.test(O));return T!==-1?G[T].toLowerCase():null}function y(){const f="en";if(typeof window==="undefined"){return f}const J=window.location.href;return S(J)||f}function x(f){const J="An unknown error occurred.";if(!f){return J}if(f instanceof Error||typeof f==="object"&&"message"in f){return f.message+""}else if(typeof f==="string"){return f}else{return J}}function B(){if(typeof window!=="undefined"){const f=window.location.host;return f.indexOf("localhost:")>-1||f.indexOf("127.0.0.1:")>-1||f.indexOf("192.168.")>-1}return true}function w(){const f=window["sa_event"];if(!f){return H}if(!P){A=`${Date.now()}_${Math.floor(Math.random()*1e4)}`;let J=null;const G=(O,U)=>{if(!O){console.error("Error: Analytics event must have a name");return}if(J){const K=J();if(K){U={...K,...U||{}}}}O=O.toLowerCase();U={...z,time:new Date().toISOString(),host:location.hostname,session_id:A,locale:y(),language:navigator?navigator.language:"<unknown>",...V(),...U||{}};if(B()){console.log(`Dev event: ${O}`,U||null);return}if(f){f(O.toLowerCase(),U)}};const T=(O,U)=>{let K="none";if(O&&O.stack){K=O.stack}else{const L=new Error;if(L.stack){const W=L.stack.split("\n");K="[STACK_FALLBACK]:"+W.slice(2).join("\n")}}G("ERROR",{error:x(O),stack:K,error_type:O?.constructor?.name||typeof O,...U||{}})};P={event:{send:G,sendError:T},addDefaultMetadata:(O)=>{z={...z||{},...O||{}}},setDefaultMetadata:(O)=>{z=O||{}},setDefaultMetadataCallback:(O)=>{J=O},getSessionId:()=>{return A}}}return P}function V(){const f=navigator.userAgent;let J="Unknown";let G="Unknown";if(f.includes("Firefox")){J="Firefox"}else if(f.includes("SamsungBrowser")){J="Samsung Browser"}else if(f.includes("Opera")||f.includes("OPR")){J="Opera"}else if(f.includes("Trident")){J="Internet Explorer"}else if(f.includes("Edge")){J="Microsoft Edge"}else if(f.includes("Chrome")){J="Chrome"}else if(f.includes("Safari")){J="Safari"}if(/Android/i.test(f)){G="Android"}else if(/iPad/i.test(f)){G="iPad"}else if(/iPhone/i.test(f)){G="iPhone"}else if(/iPod/i.test(f)){G="iPod"}else if(/Win/i.test(f)){G="Windows"}else if(/Mac/i.test(f)){G="Mac"}else if(/Linux/i.test(f)){G="Linux"}return{browser:J,device:G}}var P;var z={};var A=null;var H={event:{send:(f,J)=>{if(!$()){console.log("Analytics disabled, event not sent:",f,J||null)}return},sendError:(f,J)=>{if(!$()){console.log("Analytics disabled, error event not sent:",x(f),J||null)}return}},getSessionId:()=>{return"unknown"},setDefaultMetadata:(f)=>{return},setDefaultMetadataCallback:(f)=>{return},addDefaultMetadata:(f)=>{return}};(function(){window["_initSuccess"]=false;window["_AutofillCallbackHandler"]=window["_AutofillCallbackHandler"]||function(){};const f=[];window["_log"]=(T)=>{f.push(T)};function J(){return document.body.querySelector(`[data-dialog=unsupported]`)}function G(T){let O=T.offsetHeight;const U=T.querySelector("iframe");if(U){const K=U.getAttribute("height");if(K){const L=parseInt(K,10);if(U.offsetHeight<L){O+=L}}}return O}window.onerror=function(T,O,U,K,L){if(window["_initSuccess"]){return}console.log("Global error handler triggered",T);w().event.sendError(L,{context:"global",source:O,lineno:U,message:T+""});const W=document.body;const Q=J();if(Q.offsetHeight>0){return}const Z=W.querySelector("[data-id=unsupported-error-message]");const j=W.querySelector("[data-id=unsupported-error-button]");j.addEventListener("click",()=>{Z.parentElement.style.display="block"});Z.querySelector("pre").innerHTML=`
2${T}
3
4Source: ${O||""}
5Line: ${U||""}
6Col: ${K||""}
7Promise: ${typeof window.Promise}
8`;Q.style.display="block";const X=Q.querySelector("[data-dialog-fit]");if(X){let Y=1;Y=Math.min(window.outerWidth,window.outerHeight)/G(X);if(Y<1){X.style.animation="none";X.style.transform=`scale(${Y})`}}const _=document.body.querySelector(`[data-id=loading-blocker-dialog]`);if(_){_.style.display="none"}document.body.style.opacity="1";console.error(T)};window.addEventListener("load",()=>{let T=null;function O(){if(T){clearTimeout(T);T=null}}function U(){if(T||document.visibilityState==="hidden"){return}T=setTimeout(()=>{T=null;K()},5000)}document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden"){O()}else{U()}});U();function K(){const L=J();if(document.body.style.opacity!=="1"&&L.offsetHeight<1){const W=window["_loadState"];if(W){const Q=(W.progress||[]).map((q)=>q.state);const Z=Q.indexOf("init_storage:begin")>-1;const j=Q.indexOf("init_storage:complete:success=true")>-1;const X=Q.find((q)=>q.startsWith("init_storage:err"))||false;
8const _=Q.indexOf("init_storage:complete:success=false")>-1;const Y=Z&&!X&&!j&&!_;if(Y){console.log("Storage initialization is still pending, not triggering error handler");return}}window.onerror("Unknown issue, body is blank. \nLogs: "+f.join("\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.