import{a as z,b as Q,c as H}from"./chunk-KUR3C4SH.js";import"./chunk-TI3W5EB6.js";import"./chunk-IS3UN6PU.js";import{ab as N,hb as ae,t as h}from"./chunk-W6VUERDV.js";import"./chunk-UERONQY6.js";import"./chunk-U4JSLAJE.js";import"./chunk-KEKAC6HA.js";import"./chunk-Q5D4T2Y3.js";import"./chunk-QRL6GM6J.js";import"./chunk-7VMB4KH3.js";import"./chunk-LMOGP2ZK.js";import"./chunk-XOOENRSX.js";import"./chunk-KRXKHOBV.js";import"./chunk-CQVNCDCL.js";import{b as A,f as q,g as I,h as J,j as $,m as O,p as te}from"./chunk-5TFZQSKB.js";import{Ca as L,N as x,qa as T,u as M,v as ee}from"./chunk-YAMJAX32.js";import"./chunk-OMEYURTL.js";import{$b as m,Ab as p,Eb as c,Jc as F,Sa as P,Sb as B,Ta as C,Ua as l,Ub as v,Zb as R,_b as d,ic as w,ld as s,nb as _,nc as D,oc as S,pc as E,qa as b,rb as k,va as i,vc as j}from"./chunk-L32SNWA7.js";import{e as o}from"./chunk-ECZWGI5G.js";var y,U=o(()=>{"use strict";H();s();y=(()=>{class a extends z{getAuroraCrashConfigurationConverter(){return{convert(e,t){return{playbackData:{eventId:t.eventId,product:e.productName,container:e.container,fadeDuration:e.fadeDuration,crash$:e.crash$,gameConfiguration:{player:`${t.player}_player`,background:`${t.background}_bg`},artifactConfiguration:{player:t.player,background:t.background},orientation:"portrait"},eventUniqueId:`${e.productName}-${t.eventId}`,eventStartTimestamp:t.startTimestamp}}}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=C(a)))(r||a)}})()}static{this.\u0275prov=b({token:a,factory:a.\u0275fac})}}return a})()});var g,V=o(()=>{"use strict";s();ee();H();te();U();L();s();g=(()=>{class a extends Q{constructor(){super(i(y),i(l),i(x)),this.background="brazil",this.player="brazil"}crash(){this.triggerCrash({})}getGameConfiguration(){return{container:this.elemRef.nativeElement,crash$:this.crashSubject.asObservable(),fadeDuration:this.fadeDuration,productName:"dontDropBall"}}getEventConfiguration(){return{player:this.player,eventId:this.eventId++,background:this.background,startTimestamp:Date.now()-this.offsetTime}}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=p({type:a,selectors:[["sq-crash-ep-boom-ball-juggle"]],inputs:{background:"background",player:"player"},features:[F([A,J,O,I,y,{provide:q,useClass:$}]),c],decls:0,vars:0,template:function(t,r){},dependencies:[M],styles:[`[_nghost-%COMP%]{display:block;position:relative;inset:0;height:100%;width:100%;padding:0;margin:0;overflow:hidden}
/*# sourceMappingURL=foot-bomb-player.component-J7BL4XRH.css.map */`]})}}return a})()});var G=o(()=>{"use strict";V()});function re(a,le){a&1&&(d(0,"div",0),j(1,"loading..."),m())}var u,f=o(()=>{"use strict";s();ae();G();L();s();u=(()=>{class a extends N{constructor(){super(),this.player="brazil",this.background="brazil",this.fadeDuration=.1,this.isLoading=!0,this.isPlayerReady=!1,this.isPlaying=!1,this.canCrash=!1,this.firstLoad=!0,this.renderer=i(k),this.el=i(l)}ngOnChanges(e){if(e.state&&this.updateAnimation(),e.extraPlaylistConfiguration){this.player=this.parsePlaylistConfig(this.extraPlaylistConfiguration.player),this.background=this.parsePlaylistConfig(this.extraPlaylistConfiguration.background);let t=document.querySelector("sq-crash-base-layout");t&&this.renderer.addClass(t,`background-${this.background}`)}e.time?.currentValue!==void 0&&this.isPlayerReady&&!this.isPlaying&&this.updateAnimation()}ngOnDestroy(){this.timer&&window.clearTimeout(this.timer)}playbackReady(){this.isPlayerReady=!0,this.isLoading&&(this.isLoading=!1,this.updateAnimation())}handlePlayerError(e){this.playerError.emit(e)}handlePlaybackStart(){this.isPlaying=!0,this.canCrash=!0,this.state===h.CRASH&&this.crash(),this.playBackStart.next()}handlePlaybackEnd(){this.isPlayerReady=!1,this.isPlaying=!1,this.canCrash=!1,this.playBackEnd.next()}updateAnimation(){this.isPlayerReady&&(this.isPlaying?this.canCrash&&this.state===h.CRASH&&this.crash():this.play())}play(){this.isPlaying=!0,this.firstLoad?(this.timer=window.setTimeout(()=>{this.playerReference.play(),this.timer=void 0,T()?this.playerReady.next({useMaskAt:this.getBoundingRect()}):this.playerReady.next({})},20),this.firstLoad=!1):this.playerReference.play()}crash(){this.playerReference.crash(),this.canCrash=!1}parsePlaylistConfig(e){return e==="brazil"||e==="nigeria"||e==="italy"?e:"brazil"}getBoundingRect(){return this.el?.nativeElement?.getBoundingClientRect()}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=p({type:a,selectors:[["sq-boom-ball-juggle-player"]],viewQuery:function(t,r){if(t&1&&D(g,5),t&2){let n;S(n=E())&&(r.playerReference=n.first)}},features:[c,P],decls:2,vars:7,consts:[[1,"loading"],[3,"playbackReady","playbackStart","playbackEnd","errorDetected","volume","background","player","fadeDuration","offsetTime","allowNotApprovedPackages"]],template:function(t,r){t&1&&(B(0,re,2,0,"div",0),d(1,"sq-crash-ep-boom-ball-juggle",1),w("playbackReady",function(){return r.playbackReady()})("playbackStart",function(){return r.handlePlaybackStart()})("playbackEnd",function(){return r.handlePlaybackEnd()})("errorDetected",function(Z){return r.handlePlayerError(Z)}),m()),t&2&&(v(r.isLoading?0:-1),_(),R("volume",r.volume)("background",r.background)("player",r.player)("fadeDuration",r.fadeDuration)("offsetTime",r.time)("allowNotApprovedPackages",r.allowNotApprovedPackages))},dependencies:[g],styles:[`[_nghost-%COMP%], sq-crash-ep-boom-ball-juggle[_ngcontent-%COMP%]{background-color:transparent;color:#fff;display:block;height:100%;width:100%}.loading[_ngcontent-%COMP%]{align-items:center;display:flex;height:100%;justify-content:center;width:100%}[_nghost-%COMP%]{box-shadow:0 50px 15px #0000004d}
/*# sourceMappingURL=boom-ball-juggle-player.component-M7YW57T5.css.map */`]})}}return a})()});var oe,je,X=o(()=>{"use strict";f();oe="assets/games-crash-ui-boom-ball-juggle/",je={player:u,assetsPath:`${oe}`,sounds:{loop:[],crash:[],win:[],rocketPreamble:[],preamble:[],betButton:[],cashButton:[],multiplier:[],defaultButton:[],rocket:[],pop:[]}}});var ie,ne,Y=o(()=>{"use strict";f();ie="assets/games-crash-ui-boom-ball-juggle/",ne={player:u,assetsPath:`${ie}`,sounds:{loop:[],crash:[],win:[],rocketPreamble:[],preamble:[],betButton:[],cashButton:[],multiplier:[],defaultButton:[],rocket:[],pop:[]}}});var K=o(()=>{"use strict";X();Y()});var se=o(()=>{K()});se();export{ne as viewerModule};
//# sourceMappingURL=chunk-IMKVWZCL.js.map
