PageSourceSearch

https://www.goglobal.to/assets/DataRuntimeProviders-DR-lZMgT.js

js goglobal.to collected 2026-10-01 23:43:28 UTC 3,901 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/data-vendor-DLQwpBlT.js","assets/react-vendor-COA9LC9C.js"])))=>i.map(i=>d[i]);
2import{ak as m,aG as g,_ as l,a6 as p,C as y,ay as v,ar as E,O as b,a8 as S}from"./index-DNOAzpau.js";import{e as _,j as u}from"./react-vendor-COA9LC9C.js";import{Q as C,a as P,S as d,h as A}from"./data-vendor-DLQwpBlT.js";import"./ui-vendor-DZhVfNUY.js";const h=1e3*60*60*24,s=new C({defaultOptions:{queries:{staleTime:300*1e3,gcTime:h}}});let w=!1;function L(){if(typeof window>"u"||!window.localStorage)return;const t=window.localStorage.getItem("app-query-cache");if(t)try{d.parse(t)}catch{window.localStorage.removeItem("app-query-cache")}}function c(){w||typeof window>"u"||!window.localStorage||(w=!0,L(),l(async()=>{const{createSyncStoragePersister:t}=await import("./data-vendor-DLQwpBlT.js").then(e=>e.i);return{createSyncStoragePersister:t}},__vite__mapDeps([0,1])).then(({createSyncStoragePersister:t})=>l(async()=>{const{persistQueryClient:e}=await import("./data-vendor-DLQwpBlT.js").then(n=>n.b);return{persistQueryClient:e}},__vite__mapDeps([0,1])).then(({persistQueryClient:e})=>({createSyncStoragePersister:t,persistQueryClient:e}))).then(({createSyncStoragePersister:t,persistQueryClient:e})=>{const n=t({storage:window.localStorage,key:"app-query-cache",serialize:r=>d.stringify(r),deserialize:r=>d.parse(r)});e({queryClient:s,persister:n,maxAge:h,dehydrateOptions:{shouldDehydrateQuery:r=>{const o=r.queryKey;if(Array.isArray(o)&&Array.isArray(o[0])){const i=o[0];return i[0]==="auth"&&i[1]==="me"||i[0]==="roadmap"&&i[1]==="projectSubreddits"}return!1}}})}).catch(()=>{}))}const f=t=>{if(typeof window>"u"||!v(t))return;const e=window.location.pathname;e==="/blog-agent"||e.startsWith("/blog-agent/")||E.dispatchEvent(new CustomEvent(b,{detail:void 0}))};s.getQueryCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const e=t.query.state.error;f(e),console.error("[API Query Error]",e)}});s.getMutationCache().subscribe(t=>{if(t.type==="updated"&&t.action.type==="error"){const e=t.mutation.state.error;f(e),console.error("[API Mutation Error]",e)}});const D=g.createClient({links:[A({url:"/api/trpc",transformer:d,fetch(t,e){const n=new Headers(e?.headers??{});return n.set("x-app-brand",p()==="goseo"?"seo":"reddit"),globalThis.fetch(t,{...e??{},credentials:"include",headers:n})}})]}),k=typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"||window.location.hostname==="::1");if(k){const t=()=>{const r=globalThis.crypto;return r?.randomUUID?r.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`},e=(r,o)=>{const i=r&&r.length>0?r:`dev:${t()}`,a=new URLSearchParams;a.set("openId",i),o?.name&&a.set("name",o.name),o?.email&&a.set("email",o.email),o?.loginMethod&&a.set("loginMethod",o.loginMethod),o?.token&&a.set("token",o.token),a.set("redirect",o?.redirect??S()),window.location.href=`/api/dev/login?${a.toString()}`},n=r=>{const o=new URLSearchParams;r?.token&&o.set("token",r.token),o.set("redirect",r?.redirect??"/"),window.location.href=`/api/dev/logout?${o.toString()}`};window.goglobalDevLogin=e,window.globalDevLogin=e,window.goglobalDevEnter=r=>e(void 0,{name:r?.name??"DebugUser",token:r?.token,redirect:r?.redirect}),window.goglobalDevLogout=n,window.globalDevLogout=n,window.goglobalDevSessionCookieName=y}function q({children:t}){return _.useEffect(()=>{if(typeof window>"u")return;const e=window.location.pathname;if(m(e)){c();return}const n=()=>
2{if("requestIdleCallback"in window){window.requestIdleCallback(()=>c(),{timeout:2e3});return}globalThis.setTimeout(c,1200)};if(document.readyState==="complete"){n();return}return window.addEventListener("load",n,{once:!0}),()=>{window.removeEventListener("load",n)}},[]),u.jsx(g.Provider,{client:D,queryClient:s,children:u.jsx(P,{client:s,children:t})})}export{q as DataRuntimeProviders};

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.