"use strict";(self.webpackChunkbongacams=self.webpackChunkbongacams||[]).push([[413],{67780:function(t,n,e){e.d(n,{gt:function(){return p},hT:function(){return c},ys:function(){return s}});var i=e(15215),o=e(16053),r=e(99525),a=function(t){return{activateFanBoost:function(t,n,e,o){return(0,i.Cl)((0,i.Cl)({},t),{fanBoost:(0,i.Cl)((0,i.Cl)({},t.fanBoost),{model:n,member:e,time:o})})},deactivateFanBoost:function(t){var n=(0,i.Cl)({},t.fanBoost);return delete n.model,delete n.member,(0,i.Cl)((0,i.Cl)({},t),{fanBoost:n})},updateFanBoost:function(t,n){return(0,i.Cl)((0,i.Cl)({},t),{fanBoost:(0,i.Cl)((0,i.Cl)({},t.fanBoost),n)})}}},u=(0,o.i0)(a,r.A),s=u.activateFanBoost,c=u.deactivateFanBoost,p=u.updateFanBoost},34587:function(t,n,e){e.d(n,{Oi:function(){return s},WT:function(){return i},_6:function(){return u},cO:function(){return o},hx:function(){return r},iC:function(){return p},lC:function(){return a},tJ:function(){return c}});var i="#initialFanBoostData",o=".js-raise_model",r=".js-raise_model_btn",a=".js-fba_text_wrapper",u=".js-raise_buy",s=".js-rb_popup_wrp",c=".js-raise_what_link",p=".js-raise_what_popup_wrp"},77940:function(t,n,e){e.r(n),e.d(n,{FanBoostWidgetGuest:function(){return c},init:function(){return p}});var i=e(15215),o=e(74848),r=e(34587),a=e(67780),u=e(59256),s=e(41669),c=function(){function t(){var t=this;this.initListeners=function(){s(document).on("click",r.hx,function(n){n.stopPropagation(),s.signupEvent.call(t,{e:n})}).on("click",r.tJ,function(n){n.stopPropagation(),t.showWhatPopup()}),s(document).on("miniProfile:update",function(n,e){t.updateFanBoostState(e)})},this.showWhatPopup=function(){e.e(168).then(e.bind(e,33552)).then(function(t){var n=t.FanBoostWhatPopupContainer,e=document.querySelector(r.iC);u.w.instance.attachPopup(function(){return(0,o.jsx)(n,{handleClose:u.w.instance.detachPopup})},e)})},this.updateFanBoostState=function(t){var n,e,o=null===(n=document.querySelector(r.WT))||void 0===n?void 0:n.textContent;if(t){var u=document.createElement("div");u.innerHTML=t,o=null===(e=u.querySelector(r.WT))||void 0===e?void 0:e.textContent}if(o){var s=JSON.parse(o,function(t,n){return"string"==typeof n&&/^\d+$/g.test(n)?+n:n});s&&(0,a.gt)((0,i.Cl)({serverTimeDelta:Math.max(300,Date.now()-1e3*+s.serverTime-2e3),boostTimeLeftDate:s.boostTimeLeftTimeout>0?Date.now()+s.boostTimeLeftTimeout:null},s.fanBoost))}}}return Object.defineProperty(t,"instance",{get:function(){return this._instance=this._instance||new this},enumerable:!1,configurable:!0}),t.prototype.init=function(){this.isInitialized||(this.isInitialized=!0,this.initListeners(),this.updateFanBoostState())},t}();function p(){c.instance.init()}},59256:function(t,n,e){e.d(n,{w:function(){return c}});var i=e(74848),o=e(99128),r=e(79276),a=e(99525),u=e(16053),s=e(41669),c=function(){function t(){var t=this;this.attachPopup=function(n,e){if(t.wrapperElement)return t.detachPopup();t.isMobile?(0,r.JX)("injectable_popup",n):e&&(t.wrapperElement=document.createElement("div"),e.appendChild(t.wrapperElement),o.w.append((0,i.jsx)(u.Kq,{store:a.A,children:n()}),t.wrapperElement))},this.detachPopup=function(){t.isMobile?(0,r.Jw)():t.wrapperElement&&(o.w.unmount(t.wrapperElement),t.wrapperElement=null)},this.handleClickOutside=function(n){t.wrapperElement&&!t.wrapperElement.contains(n.target)&&t.detachPopup()},this.isMobile=a.A.getState().isMobile,this.isMobile||s(document).on("click",function(n){t.handleClickOutside(n)})}return Object.defineProperty(t,"instance",{get:function(){return this._instance=this._instance||new this},enumerable:!1,configurable:!0}),t}()}}]);