1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="75b7832f-0dec-5cea-9245-10f5b4d67e07")}catch(e){}}(); 3import{t as e}from"./global-mode-constants-BlhfK4uI.js";import{b as t}from"./Client-B1d-tcm5.js";import{t as n}from"./get-whop-browser-client-D5KK-vFv.js";var r=100;function i(e){return!e.title||!e.prompt?null:{title:e.title,cta:e.prompt,actionKey:e.action_type??void 0,executionType:`whop_ai`}}function a(e){return{queryKey:[`economic-intelligence`,e],queryFn:async()=>{try{return(await n().economicIntelligence.list({account_id:e,first:40})).response}catch(e){if(e instanceof t&&e.statusCode===403)return null;throw e}},staleTime:3e4,retry:(e,n)=>!(n instanceof t&&[401,403,404].includes(n.statusCode??0))&&e<2}}function o(e,i=n()){let o=a(e);return{...o,queryKey:[...o.queryKey,`ready-pool`],queryFn:async()=>{try{let[t,n]=await Promise.all([i.economicIntelligence.list({account_id:e,status:`ready`,first:22}),i.economicIntelligence.list({account_id:e,first:r})]);return{readyCards:t.response.data,runCards:n.response.data.filter(e=>l(e)!==null),generationStartedAt:n.response.data.reduce((e,t)=>(t.status===`queued`||t.status===`pending`)&&t.created_at&&(!e||t.created_at<e)?t.created_at:e,void 0)}}catch(e){if(e instanceof t&&e.statusCode===403)return null;throw e}}}}function s(e,t){return Promise.all([e.invalidateQueries({queryKey:a(t).queryKey}),e.invalidateQueries({queryKey:c().queryKey})])}function c(){return{queryKey:[`economic-intelligence`,`runs`],queryFn:async()=>(await n().economicIntelligence.list({has_run:!0,order:`run_started_at`,first:r})).response.data,staleTime:3e4}}function l(e){return e.run_started_at&&(e.status===`running`||e.status===`executed`||e.status===`incomplete`)?e.status:null}function u(e,t){return n().economicIntelligence.executeEconomicIntelligence(e,{account_id:t},{timeoutInSeconds:2,maxRetries:0})}function d(e,t){return n().economicIntelligence.update(e,{status:`acknowledged`,account_id:t},{maxRetries:0})}function f(e){return[..._(e.readyCards),...e.runCards.filter(e=>l(e)===`running`&&e.ai_chat_id)]}function p(e,{apiVersionDate:t,client:r=n()}={}){return{queryKey:t?[`account`,e,t]:[`account`,e],queryFn:()=>r.accounts.retrieve(e,void 0,{apiVersionDate:t??`2026-09-22-2`}),staleTime:6e4}}function m(){return{queryKey:[`global-account`,`readonly`],queryFn:()=>n().accounts.retrieve(`global`,void 0,{apiVersionDate:`2026-08-13`,headers:{[e]:`readonly`}}),staleTime:3e4}}function h(e,t){return n().economicIntelligence.update(e,{status:`superseded`,account_id:t},{maxRetries:0})}function g(e,t,r,i){return n().economicIntelligence.update(e,{account_id:t,sentiment:r,...r===`negative`?{status:`superseded`}:{},...i?{user_feedback:i}:{}},{maxRetries:0})}function _(e){return e.filter(e=>e.sentiment!==`negative`)}function v(e){return{queryKey:[`economic-intelligence`,`onboarding`,e],queryFn:async()=>(await n().economicIntelligence.list({first:1})).response.data.find(e=>e.action_type===`create_business`&&!e.account_id)??null,staleTime:3e4}}export{o as a,c,s as d,u as f,_ as h,i,f as l,h as m,d as n,a as o,g as p,v as r,l as s,p as t,m as u}; 4//# debugId=75b7832f-0dec-5cea-9245-10f5b4d67e07
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.