1"use strict";(self.webpackChunkgreenluck=self.webpackChunkgreenluck||[]).push([[4712],{8204:(P,u,e)=>{e.d(u,{N:()=>A});var i=e(54438),r=e(11593),a=e(51320),s=e(14824),I=e(12316),h=e(62885),O=e(76525),T=e(48024),C=e(84412),S=e(92771),d=e(5964),f=e(23294),N=e(17360),_=e(57786),R=e(70152),D=e(25558),g=e(44668),l=e(99437),U=e(983),c=e(71203),v=e(18810);let A=(()=>{class o{constructor(){this.apiService=(0,i.WQX)(a.d),this.accountStateService=(0,i.WQX)(s.s),this.router=(0,i.WQX)(r.Ix),this.routerParamsService=(0,i.WQX)(I.f),this.loggerService=(0,i.WQX)(h.g),this.defaultNotFoundRoutingPage=(0,i.WQX)(O.K),this.refreshSubject=new C.t(void 0),this.paramsSubject=new S.m(1),this.isAuthorizedTrue$=this.accountStateService.isAuthorized().pipe((0,d.p)(Boolean)),this.params$=this.paramsSubject.pipe((0,f.F)((t,n)=>(0,T.c)(t,n))),this.promoItemFetch$=this.params$.pipe((0,N.v)((0,_.h)(this.isAuthorizedTrue$,this.refreshSubject)),(0,R.B)(0),(0,D.n)(([t])=>this.fetchPromoItem(t)),(0,g.t)({refCount:!0,bufferSize:1}))}refreshPromoItem(){this.refreshSubject.next()}getPromoItemWithNavigation(t){return this.getPromoItem(t).pipe((0,l.W)(()=>this.navigate()))}getPromoGuard(t){return this.getPromoItem(t)}getPromoItem(t){return this.paramsSubject.next(t),this.promoItemFetch$.pipe(this.withNotFoundLogging(t))}fetchPromoItem(t){return this.apiService.getPromoItem(t)}navigate(){return this.routerParamsService.flatten$.pipe((0,D.n)(t=>(this.router.navigate([t.notFoundRedirectUrl??this.defaultNotFoundRoutingPage]),U.w)))}withNotFoundLogging(t){return(0,c.F)((0,l.W)(n=>(this.notifyPromoItemNotFound(t.alias),(0,v.$)(()=>n))))}notifyPromoItemNotFound(t){this.loggerService.info({type:"info",category:"account/promo",message:`Promo "${t}" item not found`})}static#t=this.\u0275fac=function(n){return new(n||o)};static#e=this.\u0275prov=i.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})()},11332:(P,u,e)=>{e.d(u,{v:()=>A});var i=e(31635),r=e(54438),a=e(49894),s=e(8097),I=e(88141),h=e(14824),O=e(4527),T=e(68300),C=e(60935),S=e(99437),d=e(983),f=e(70980),N=e(22806),_=e(25558),R=e(8204),D=e(89130);let g=(()=>{class o{constructor(t){this.baseApiService=t}optIn(t){return this.baseApiService.patch("/api/opt-in/subscription",{body:t})}static#t=this.\u0275fac=function(n){return new(n||o)(r.KVO(D.v))};static#e=this.\u0275prov=r.jDH({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();var c=function(o){return o.AUTHORIZED="authorized",o.NOT_AUTHORIZED="notAuthorized",o.OPT_IN_REQUIRED="optInRequired",o.OPT_IN_DEPOSIT_COUNTING_ON="optInDepositCountingON",o.OPT_IN_DEPOSIT_COUNTING_OFF="optInDepositCountingOFF",o.OPT_IN_BONUS_RECEIVED="optInBonusReceived",o}(c||{});let v=(()=>{let o=class m{constructor(){this.templateRef=(0,r.WQX)(r.C4Q),this.viewContainer=(0,r.WQX)(r.c1b),this.cdr=(0,r.WQX)(r.gRc),this.promoOptInService=(0,r.WQX)(g),this.dialogService=(0,r.WQX)(T.F),this.stateService=(0,r.WQX)(R.N),this.templateContext={$implicit:null,controller:{isLoading:!1}},this.optInRunner=s.F.firstEmit((0,a.s)(this)),this.optOutRunner=s.F.firstEmit((0,a.s)(this)),this.templates=new Map([[c.AUTHORIZED,this.templateRef]])}addTemplate(t,n){this.templates.set(t,n)}render(t){const{state:n,context:E}=this.getStateAndContext({account:t.account,promo:t.promo});n?this.renderState(n,E):this.viewContainer.clear()}optIn(t){return this.templateContext.controller.isLoading=!0,this.promoOptInService.optIn(t).pipe((0,I.M)(()=>{this.stateService.refreshPromoItem()}),(0,S.W)(()=>d.w),(0,f.j)(()=>{this.templateContext.controller.isLoading=!1,this.cdr.markForCheck()}))}openConfirmPromoOptOutDialog(){return(0,N.H)(this.dialogService.open({componentName:C.S.confirmPromoOptOut}))}renderState(t,n){const E=this.templates.get(t);E&&(this.viewContainer.clear(),this.viewContainer.createEmbeddedView(E,n),this.cdr.detectChanges())}getStateAndContext(t){if(this.templateContext.$implicit=t.account,function l({account:o,promo:p}){return!(!o||!p)&&[O.J$.WEEKLY_CASHBACK,O.J$.WEEKLY_RELOAD,O.J$.WEEKEND_RELOAD].includes(p.bonusType)&&p.currentState.type===O.zP.OPT_IN_REQUIRED}(t)){const n=t.promo;return this.templateContext.controller.optIn=()=>{this.optInRunner.add(this.optIn({targetId:n.targetId,isOptedIn:!0,type:n.bonusType}))},{state:c.OPT_IN_REQUIRED,context:this.templateContext}}if(function U({account:o,promo:p}
1){return!(!o||!p)&&[O.J$.WEEKLY_CASHBACK,O.J$.WEEKLY_RELOAD,O.J$.WEEKEND_RELOAD].includes(p.bonusType)&&[O.zP.DEPOSIT_COUNTING_ON,O.zP.DEPOSIT_COUNTING_OFF].includes(p.currentState.type)}(t)){const n=t.promo;return this.templateContext.controller.optOut=()=>{this.optOutRunner.add(this.openConfirmPromoOptOutDialog().pipe((0,_.n)(E=>E.afterClosed()),(0,_.n)(E=>E?this.optIn({targetId:n.targetId,isOptedIn:!1,type:n.bonusType}):d.w)))},n.currentState.type===O.zP.DEPOSIT_COUNTING_OFF?(this.templateContext.controller.startDate=n.currentState.startDate,{state:c.OPT_IN_DEPOSIT_COUNTING_OFF,context:this.templateContext}):{state:c.OPT_IN_DEPOSIT_COUNTING_ON,context:this.templateContext}}return t.promo?.currentState.type===O.zP.BONUS_RECEIVED?{state:c.OPT_IN_BONUS_RECEIVED,context:this.templateContext}:t.account?{state:c.AUTHORIZED,context:this.templateContext}:t.account?{}:{state:c.NOT_AUTHORIZED,context:this.templateContext}}static#t=this.\u0275fac=function(n){return new(n||m)};static#e=this.\u0275prov=r.jDH({token:m,factory:m.\u0275fac})};return o=(0,i.Cg)([(0,a.d)()],o),o})(),A=(()=>{let o=class M{constructor(){this.accountStateService=(0,r.WQX)(h.s),this.promoUserStateService=(0,r.WQX)(v),this.rxRunner=s.F.lastEmit((0,a.s)(this))}set optInTpl(t){this.promoUserStateService.addTemplate(c.OPT_IN_REQUIRED,t)}set optInDepositCountingONTpl(t){this.promoUserStateService.addTemplate(c.OPT_IN_DEPOSIT_COUNTING_ON,t)}set optInDepositCountingOFFTpl(t){this.promoUserStateService.addTemplate(c.OPT_IN_DEPOSIT_COUNTING_OFF,t)}set optInBonusReceivedTpl(t){this.promoUserStateService.addTemplate(c.OPT_IN_BONUS_RECEIVED,t)}set notAuthorizedTpl(t){this.promoUserStateService.addTemplate(c.NOT_AUTHORIZED,t)}ngOnChanges(){this.rxRunner.add(this.accountStateService.getAccount().pipe((0,I.M)(t=>{this.promoUserStateService.render({account:t,promo:this.promo})})))}static#t=this.\u0275fac=function(n){return new(n||M)};static#e=this.\u0275dir=r.FsC({type:M,selectors:[["","stbPromoUserState",""]],inputs:{promo:[0,"stbPromoUserStatePromo","promo"],optInTpl:[0,"stbPromoUserStateOptInTpl","optInTpl"],optInDepositCountingONTpl:[0,"stbPromoUserStateOptInDepositCountingONTpl","optInDepositCountingONTpl"],optInDepositCountingOFFTpl:[0,"stbPromoUserStateOptInDepositCountingOFFTpl","optInDepositCountingOFFTpl"],optInBonusReceivedTpl:[0,"stbPromoUserStateOptInBonusReceivedTpl","optInBonusReceivedTpl"],notAuthorizedTpl:[0,"stbPromoUserStateNotAuthorizedTpl","notAuthorizedTpl"]},features:[r.Jv_([v]),r.OA$]})};return o=(0,i.Cg)([(0,a.d)()],o),o})()},47387:(P,u,e)=>{e.d(u,{K:()=>r});var i=e(54438);let r=(()=>{class a{static#t=this.\u0275fac=function(h){return new(h||a)};static#e=this.\u0275mod=i.$C({type:a});static#o=this.\u0275inj=i.G2t({})}return a})()},4527:(P,u,e)=>{e.d(u,{J$:()=>r,c5:()=>i,zP:()=>a});var i=function(s){return s.CASINO="casino",s.SPORT="sport",s.SPECIAL="special",s}(i||{}),r=function(s){return s.BASIC="BASIC",s.WEEKLY_CASHBACK="CASHBACK",s.WEEKLY_RELOAD="WEEKLY_RELOAD",s.WEEKEND_RELOAD="WEEKEND_RELOAD",s}(r||{}),a=function(s){return s.OPT_IN_NOT_REQUIRED="OPT_IN_NOT_REQUIRED",s.OPT_IN_REQUIRED="OPT_IN_REQUIRED",s.DEPOSIT_COUNTING_ON="DEPOSIT_COUNTING_ON",s.DEPOSIT_COUNTING_OFF="DEPOSIT_COUNTING_OFF",s.BONUS_RECEIVED="BONUS_RECEIVED",s}(a||{})}}]);
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.