Build 555975stable
Module 466459
725 characters · in 0132092593eb02e6.jsDependencies
Source Raw
function(e,t,n){n.d(t,{h:()=>o,o:()=>d});var s=n(791282),i=n.n(s),a=n(575593),l=n(17928),r=n(4227);let d=(e,t)=>{let n=null!=e.getPurchase(t.skuId),s=t.items??[],l=i()(s.map(t=>e.getPurchase(t.skuId)));switch(t?.type){case a.R.BUNDLE:return{isPurchased:n||s.length>0&&l.length===s.length,isPartiallyOwnedBundle:l.length>0&&l.length<s.length,isPartiallyOwnedVariantsGroup:!1};case a.R.VARIANTS_GROUP:let r=t.variants?.every(t=>null!=e.getPurchase(t.skuId)),d=t.variants?.some(t=>null!=e.getPurchase(t.skuId))&&!r;return{isPurchased:r??!1,isPartiallyOwnedBundle:!1,isPartiallyOwnedVariantsGroup:d??!1};default:return{isPurchased:n,isPartiallyOwnedBundle:!1,isPartiallyOwnedVariantsGroup:!1}}},o=e=>(0,l.cf)([r.A],()=>d(r.A,e))}