Loading
function(e,t,n){"use strict";n.d(t,{g:()=>g}),n(321073);var l=n(627968);n(64700);var i=n(231723),s=n(192308),r=n(820739),a=n(73825),o=n(753390),u=n(287809),c=n(178368),d=n(97352),m=n(473145),h=n(212637),p=n(652215);let f="apply-guild-boost-modal";async function g(e){let{analyticsLocations:t,analyticsLocation:g,analyticsSourceLocation:E,numberOfBoostsToAdd:A,onClose:C,onLoading:x,closeLayer:I,onSubscriptionConfirmation:_,onSubscribeComplete:S,guild:y,handleSubscribeModalClose:v,disablePremiumUpsell:T,inPopout:N,applicationId:j,intent:b}=e,R=N?i.KX:i.SY,P=u.default.getCurrentUser();if(null==P)return;if(!P.verified)return void(0,s.openModalLazy)(async()=>{let{default:e}=await Promise.all([n.e("54681"),n.e("74913"),n.e("12206"),n.e("90406")]).then(n.bind(n,661925));return t=>{let{onClose:n,...i}=t;return(0,l.jsx)(e,{...i,onClose:n})}},{contextKey:R});let L=[];d.A.isLoadedForPremiumSKUs()||L.push((0,a.zS)()),c.A.hasFetched||(L.push(o.hP()),L.push((0,r.CD)())),L.length>0&&(x?.(!0),await Promise.allSettled(L),x?.(!1));let M=(0,m.D$)(c.A.boostSlots),O=M.length;function w(e){C?.(),v?.(e)}if(O>0&&(null==A||O>=A)){let e;1===O?e=M.slice(0,1):null!=A&&(e=M.slice(0,A)),await (0,s.openModalLazy)(async()=>{let{default:t}=await Promise.all([n.e("71455"),n.e("39281"),n.e("58164"),n.e("71470"),n.e("10943"),n.e("95602"),n.e("22455"),n.e("18710"),n.e("34428"),n.e("38249")]).then(n.bind(n,724624));return n=>{let{onClose:i,...s}=n;return(0,l.jsx)(t,{...s,onClose:e=>{i(),w(e)},selectedGuild:y,locationSection:p.liQ.PREMIUM_GUILD_USER_MODAL,guildBoostSlots:e,intent:b})}},{modalKey:f,onCloseRequest:()=>{(0,s.closeModal)(f),w(!1)},contextKey:R})}else(0,h.A)({analyticsLocations:t,analyticsLocation:g,analyticsSourceLocation:E,guildId:y.id,closeLayer:function(){C?.(),I?.()},totalNumberOfSlotsToAssign:A??1,onCloseModal:w,disablePremiumUpsell:T,onSubscriptionConfirmation:_,onSubscribeComplete:S,inPopout:N,applicationId:j,intent:b})}}