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]=`be24318e-cc9b-4787-84ce-e33cdd14251f`,e._sentryDebugIdIdentifier=`sentry-dbid-be24318e-cc9b-4787-84ce-e33cdd14251f`)}catch{}import{o as e}from"./rolldown-runtime-nx40z1zs.js";import{Qh as t,Zm as n,_d as r,hd as i,jg as a,ld as o,vd as s,xd as c}from"./entry.client-mpghtlrl.js";import{i as l}from"./determineUpsells-munlya5p.js";var u=e(a(),1);function d(e){let{catalog:a,contentAccess:d}=n(),{data:f}=t({...a.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===o.Active&&n.has(e)).map(([e])=>e),a=new Set(r);if(a.has(`CFQ7TTC0KHS0`))for(let e of s)e!==`CFQ7TTC0KHS0`&&a.delete(e);else a.has(`CFQ7TTC0P85B`)&&a.delete(i);return Array.from(a)},[p,m]);return e===void 0||m.ids.length+m.syogIds.length===0?{productId:void 0,subscriptionIds:[i,r,c],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};