try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`612f2a5c-2eb6-4093-a0d0-bed7e544ec60`,e._sentryDebugIdIdentifier=`sentry-dbid-612f2a5c-2eb6-4093-a0d0-bed7e544ec60`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Dg as t,Ig as n,lf as r,nf as i,pf as a,sf as o,sh as s,uf as c}from"./entry.client-dr7r6s9a.js";import{i as l}from"./determineUpsells-kizqoxq1.js";var u=e(n(),1);function d(e){let{catalog:n,contentAccess:d}=s(),{data:f}=t({...n.queries.productInfo.basic.getOptions({productId:e??``}),enabled:!!e}),{data:p}=t({...d.queries.passAccess.getOptions(),enabled:!1}),m=(0,u.useMemo)(()=>l(f?.xcloud?.programs,f?.includedInSubscriptions),[f]),h=(0,u.useMemo)(()=>{if(!p)return[];let{ids:e,syogIds:t}=m,n=new Set([...t,...e]),r=Array.from(p.entries()).filter(([e,t])=>t?.passStatus===i.Active&&n.has(e)).map(([e])=>e),a=new Set(r);if(a.has(`CFQ7TTC0KHS0`))for(let e of c)e!==`CFQ7TTC0KHS0`&&a.delete(e);else a.has(`CFQ7TTC0P85B`)&&a.delete(o);return Array.from(a)},[p,m]);return e===void 0||m.ids.length+m.syogIds.length===0?{productId:void 0,subscriptionIds:[o,r,a],syogIds:m.syogIds,includedInIds:m.ids,userSubscriptionIds:h}:{productId:e,includedInIds:m.ids,subscriptionIds:[...m.syogIds,...m.ids],syogIds:m.syogIds,userSubscriptionIds:h}}export{d as t};