PageSourceSearch

https://team0.ai/_next/static/chunks/9498-fbc5a9f04c9be69b.js

js team0.ai collected 2026-10-05 15:19:38 UTC 5,331 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9498],{49498:(t,e,a)=>{a.d(e,{Kj:()=>n,Yq:()=>o,cn:()=>i,sg:()=>u});var r=a(2821),s=a(75889);function i(...t){return(0,s.QP)((0,r.$)(t))}function n(t){return t?t instanceof Date?t:"string"==typeof t?new Date(t.endsWith("Z")||/[+-]\d{2}:?\d{2}$/.test(t)?t:t.replace(" ","T")+"Z"):new Date(t):null}function o(t,e={}){let a={month:"short",day:"numeric",year:"numeric",...e};return new Intl.DateTimeFormat("en-US",a).format(n(t))}function u(t,e=300){let a;return function(...r){clearTimeout(a),a=setTimeout(()=>{clearTimeout(a),t(...r)},e)}}a(12115),a(60867)},60867:(t,e,a)=>{a.r(e),a.d(e,{ApiClient:()=>r,api:()=>s});class r{constructor(){this.baseUrl="https://api.team0.ai",this.startupId=null,this.tokenGetter=null}setTokenGetter(t){this.tokenGetter=t}_recoverFromStale401(){let t="t0_stale_bundle_reloaded";try{if(sessionStorage.getItem(t))return;sessionStorage.setItem(t,"1"),console.warn("\uD83D\uDD04 Reloading once to pick up a newer bundle after 401"),window.location.reload()}catch{}}async refreshStartupId(){return this.startupId=null,localStorage.removeItem("startup_id"),this.getStartupId()}async getStartupId(){let t=window.location.pathname.includes("/onboarding/conversational");if(this.startupId&&!t){let t=localStorage.getItem("startup_id");if(!t||t===this.startupId)return this.startupId;console.warn("\uD83D\uDD04 Cached startup_id mismatch detected, clearing cache"),this.startupId=null}let e=localStorage.getItem("startup_id");return e&&"null"!==e&&"undefined"!==e&&!t?(this.startupId=e,this.startupId):(console.warn("\uD83D\uDD0D API client: No startup_id found in localStorage"),null)}async getHeaders(){let t={"Content-Type":"application/json",Accept:"application/json"};if(this.tokenGetter)try{let e=await this.tokenGetter();e&&(t.Authorization=`Bearer ${e}`)}catch(t){console.warn("Failed to get Clerk token:",t)}else{let e=localStorage.getItem("owner_id");e&&"null"!==e&&"undefined"!==e&&(console.warn("⚠️ Using legacy X-User-ID authentication - this component should use useAuthenticatedApi instead"),t["X-User-ID"]=e)}
1{let e=await this.getStartupId();e&&"null"!==e&&"undefined"!==e&&(t["X-Startup-Id"]=e)}return t}async addStartupIdToUrl(t,e=!0){if(!e)return t;let a=new URL(t,this.baseUrl),r=a.pathname;if(["/api/onboarding","/api/credits","/api/payment","/api/agents","/api/dashboard","/api/knowledge","/api/schedule","/api/tasks","/api/tools","/api/infrastructure","/api/setup","/api/waiting_list","/api/services","/api/startup","/api/user","/api/startupuser","/api/customeruser"].some(t=>r.startsWith(t)))return t;let s=await this.getStartupId();return s&&!a.searchParams.has("startup_id")&&a.searchParams.set("startup_id",s),a.toString()}async get(t,e={}){let a=await this.getHeaders(),r=await this.addStartupIdToUrl(`${this.baseUrl}${t}`);if(e.params){let t=new URLSearchParams;Object.entries(e.params).forEach(([e,a])=>{null!=a&&t.append(e,a)});let a=t.toString();a&&(r+=(r.includes("?")?"&":"?")+a)}let s=await fetch(r,{...e,method:"GET",headers:{...a,...e.headers||{}},credentials:"include"});if(!s.ok)throw 401===s.status&&(console.error("❌ Authentication failed - this component should use useAuthenticatedApi hook instead of api client"),this._recoverFromStale401()),Error(`HTTP error! status: ${s.status}`);return s.json()}async post(t,e={},a={}){let r=await this.getHeaders(),s=await this.addStartupIdToUrl(`${this.baseUrl}${t}`),i=await fetch(s,{...a,method:"POST",headers:{...r,...a.headers||{}},body:JSON.stringify(e),credentials:"include"});if(!i.ok){401===i.status&&(console.error("❌ Authentication failed - this component should use useAuthenticatedApi hook instead of api client"),this._recoverFromStale401());let t=await i.text();throw Error(`HTTP error! status: ${i.status}, message: ${t}`)}return i.json()}async put(t,e={},a={}){let r=await this.getHeaders(),s=await this.addStartupIdToUrl(`${this.baseUrl}${t}`),i=await fetch(s,{...a,method:"PUT",headers:{...r,...a.headers||{}},body:JSON.stringify(e),credentials:"include"});if(!i.ok)throw 401===i.status&&(console.error("❌ Authentication failed - this component should use useAuthenticatedApi hook instead of api client"),this._recoverFromStale401()),Error(`HTTP error! status: ${i.status}`);return i.json()}async patch(t,e={},a={}){let r=await this.getHeaders(),s=await this.addStartupIdToUrl(`${this.baseUrl}${t}`),i=await fetch(s,{...a,method:"PATCH",headers:{...r,...a.headers||{}},body:JSON.stringify(e),credentials:"include"});if(!i.ok)throw 401===i.status&&(console.error("❌ Authentication failed - this component should use useAuthenticatedApi hook instead of api client"),this._recoverFromStale401()),Error(`HTTP error! status: ${i.status}`);return i.json()}async delete(t,e={}){let a=await this.getHeaders(),r=await this.addStartupIdToUrl(`${this.baseUrl}${t}`),s=await fetch(r,{...e,method:"DELETE",headers:{...a,...e.headers||{}},credentials:"include"});if(!s.ok)throw 401===s.status&&(console.error("❌ Authentication failed - this component should use useAuthenticatedApi hook instead of api client"),this._recoverFromStale401()),Error(`HTTP error! status: ${s.status}`);return s.json()}async getAuth(t,e=null){return console.warn("⚠️ getAuth is deprecated - use useAuthenticatedApi hook instead"),this.get(t)}}let s=new r}}]);

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.