PageSourceSearch

https://casinosanalyzer.ca/build/midori/assets/js/bundles/chunks/scripts.bundle/wheelsExitPopup-C8warPoQ.js

js casinosanalyzer.ca collected 2026-09-25 23:53:28 UTC 20,914 bytes, 1 lines download raw bytes

1import{t as _inherits,i as _createClass,_ as __translate,w as navAff,o as _toConsumableArray,K as brevoUtmData,p as _slicedToArray,L as authPopup,e as eventID,x as utmParams,M as BonusesPopup,j as _classCallCheck,v as _callSuper}from"../../scripts.bundle-Dfwqsvy1.min.js";var WheelsExitPopup=function(){function e(t,n,i){var o;return _classCallCheck(this,e),(o=_callSuper(this,e)).data=t,o.loc=n,o.localCountry=i,o.wheelsExitPopupShown=!1,o.wheelsExitPopupStorage=storage.getWheelsExitPopup(),o.wheelsExitPopupLimit=6,o.selector=document.querySelector('.bonusesPopup[data-type="wheelsExitPopup"]'),o.authWheelPopup=document.getElementById("authWheelPopup"),o.eventCat="w_website_wheels_exit_popup",o.formResize=!0,o.formSuccess=!1,o.formFulfilled=!1,o.mobileWidth=992,o}return _inherits(e,BonusesPopup),_createClass(e,[{key:"translate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return __translate(e,this.localCountry||"en",t)||e}},{key:"exitPopupInit",value:function(){this.selector&&this.exitPopupTrigger()}},{key:"exitPopupTrigger",value:function(){var e=this;document.body.addEventListener("mouseleave",function(t){var n=document.getElementById("authWheelPopup");e.wheelsExitPopupShown||n||window.innerWidth>
1e.mobileWidth&&e.wheelsPopupTriggerRender(t)});var t,n=0,i=!1,o=Math.round(document.body.offsetHeight/10);window.addEventListener("scroll",function(){if(!e.wheelsExitPopupShown&&window.innerWidth<e.mobileWidth){var s=document.documentElement.scrollTop;if(s<n)i||(i=!0,t=s),t-s>=o&&(i=!1,e.wheelsPopupTriggerRender());else i=!1;n=s}})}},{key:"wheelsPopupTriggerRender",value:function(e){var t=this,n=document.querySelector("#emailPopup"),i=document.querySelector("#authPopup"),o=document.querySelector("#userReviewPopup"),s=n&&n.classList.contains("show"),a=document.querySelector("#questPopup"),r=a&&a.classList.contains("questPopup--show"),l=document.querySelector("#bonusVault.active"),c=document.querySelector('[data-element="reactionsFeedbackPopup"]'),u=document.querySelector("#requiredDayPopup");if((!e||!e.toElement&&!e.relatedTarget)&&!this.wheelsExitPopupShown&&!this.wheelsExitPopupStorage&&!s&&!i&&!o&&!r&&!l&&!c&&!u&&0===this.selector.children.length){var d={widgetTitle:"Wheels Exit Popup",eventCat:this.eventCat,eventName:"open",widgetPref:"showBlock",clickAffLinkVersion:30,showWidgetVersion:31,casinos:this.data};this.generatePopup(this.data),setTimeout(function(){t.renderSibLinks()},100),setTimeout(function(){document.body.classList.add("bonusesPopup__show"),document.body.dataset.popupType="wheelsExitPopup",t.selector.classList.add("show"),t.resizePopup()},500),setTimeout(function(){t.showBlockAmplitude(d)},0)}}},{key:"resizePopup",value:function(){var e=this;if(window.addEventListener("resize",function(){var t=document.querySelector(".wheels__wrapper"),n=document.querySelector(".wheels__form--text"),i=document.querySelector(".wheels__form--text .wheels__wrapper"),o=document.querySelector(".wheels__card:first-of-type");e.formResize&&(window.innerWidth<e.mobileWidth?(t&&t.remove(),n&&n.append(t)):(i&&i.remove(),o&&o.append(t)))}),this.formResize&&window.innerWidth<this.mobileWidth){var t=document.querySelector(".wheels__wrapper"),n=document.querySelector(".wheels__form--text");document.querySelector(".wheels__form--text .wheels__wrapper"),t&&t.remove(),n.append(t)}}},{key:"resizeSuccessPopup",value:function(){var e=this;if(window.addEventListener("resize",function(){var t=document.querySelector(".wheels__wrapper"),n=document.querySelector(".wheels__form--text"),i=document.querySelector(".wheels__form--text .wheels__wrapper"),o=document.querySelector(".wheels__form");e.formSuccess&&(window.innerWidth<e.mobileWidth?(t&&t.remove(),n.append(t),t.classList.add("formSuccess"),o&&o.classList.add("hide")):(i&&i.remove(),document.querySelector(".wheels__card:first-of-type").append(t),t.classList.remove("formSuccess"),o&&o.classList.remove("hide")))}),this.formSuccess&&window.innerWidth<this.mobileWidth){var t=document.querySelector(".wheels__wrapper"),n=document.querySelector(".wheels__form--text"),i=document.querySelector(".wheels__form");t&&t.remove(),n.append(t),t.classList.add("formSuccess"),i&&i.classList.add("hide")}}},{key:"resizeFulfilledPopup",value:function(){var e=this;if(window.addEventListener("resize",function(){var t=document.querySelector(".wheels__win"),n=document.querySelector(".wheels__form--text"),i=document.querySelector(".wheels__form--text .wheels__win"),o=document.querySelector(".wheels__card:nth-child(2)"),s=document.querySelector(".wheels__card:first-of-type");e.formFulfilled&&(window.innerWidth<e.mobileWidth?(t.remove(),n.append(t),o.classList.add("formFulfilled")):(i&&i.remove(),s&&s.append(t),o.classList.remove("formFulfilled")))}),this.formFulfilled&&window.innerWidth<this.mobileWidth){var t=document.querySelector(".wheels__win"),n=document.querySelector(".wheels__form--text"),i=document.querySelector(".wheels__card:nth-child(2)");t.remove(),n.append(t),i.classList.add("formFulfilled")}}},{key:"generatePopup",value:function(e){var t=this,n=document.createElement("div");n.className="wheelsExitPopup__wrapper",n.addEventListener("click",function(e){return e.stopPropagation()});var i=document.createElement("div");i.className="wheels__card",i.append(this.generateWheel());var o=document.createElement("div");o.className="wheels__card",o.append(this.generatePopupCloseBtn(),this.generateForm()),n.append(i,o),this.selector.append(n);var s=this.selector.querySelector("#wheels-sib-form");s&&s.addEventListener("submit",function(n){n.preventDefault();var i=s.querySelector(".sib-input input"),o=i.value.trim(),a=s.querySelector(".sib-form-block__button-with-loader"),r=t.selector.querySelector(".wheels__form--title"),l=t.selector.querySelector(".wheels__form--description"),c=s.querySelector(".entry__error");t.isValidEmail(o)?(t.showFormError(c,""),t.loadingPending(i,o,a,r,l),t.submitSubscription(s),t.startSpin(i,o,a,r,l,e)):t.showFormError(c,t.translate("Invalid email format. Please try again"))});var a=document.querySelector(".wheelsExitPopup__wrapper .wheels__spin-btn");a&&a.addEventListener("click",function(n){n.preventDefault();var i=document.querySelector(".wheels__form--title"),o=document.querySelector(".wheels__form--description");t.formResize=!1,t.formSuccess=!0;var s=t.getWinnerBonus();a.classList.add("loading"),t.loadingSuccessWithoutForm(i,o,s);var r={widgetTitle:"Wheels Exit Popup",eventCat:"w_website_wheels_exit_popup",eventName:"submit",widgetPref:"click",clickAffLinkVersion:30,showWidgetVersion:31,casinos:e,authorized:"true"};setTimeout(function(){t.showBlockAmplitude(r)},0),setTimeout(function(){t.formSuccess=!1,t.formFulfilled=!0,a.remove(),t.loadingFulfilledWithoutForm(i,o,s)},3500)}),this.selector.addEventListener("click",function(e){e.target===t.selector&&t.closePopup()})}},{key:"loadingPending",value:function(e,t,n,i,o){n.classList.add("loading"),n.setAttribute("disabled",!0),e.placeholder=t}},{key:"loadingSuccess",value:function(e,t,n,i,o,s){n&&n.setAttribute("disabled",!0),e&&(e.value=t,e.setAttribute("disabled",!0)),this.loadingSuccessWithoutForm(i,o,s)}},{key:"loadingSuccessWithoutForm",value:function(e,t,n){var i;switch(e&&(e.innerHTML=this.translate("Wild!")),t&&(t.innerHTML=this.translate("Your reward is loading...")),n){case 1:i="spinSecond";break;case 2:i="spinThird";break;case 3:i="spinFourth";break;default:i="spinFirst"}var o=document.querySelector(".wheels__content");o.classList.add("rotation"),o.classList.add(i);var s=document.querySelector(".wheels__labels");s.classList.add("rotation"),s.classList.add(i),this.resizeSuccessPopup()}},{key:"loadingFulfilled",value:function(e,t,n){var i=document.querySelector(".wheels__form");i&&i.remove(),this.loadingFulfilledWithoutForm(e,t,n)}},{key:"loadingFulfilledWithoutForm",value:function(e,t,n){e&&(e.innerHTML=this.translate("Boom!")),t&&(t.innerHTML=this.translate("Look who’s on fire!"));var i=document.querySelector(".wheels__wrapper");i&&i.remove();var o=document.createElement("div");o.className="wheels__win",i&&i.append(o),setTimeout(function(){o.classList.add("show")},100);var s=document.querySelector(".wheels__card:first-of-type");s&&s.append(o);var a=this.generateBonus(n),r=document.querySelector(".wheels__form--wrapper");a&&r&&r.append(a),this.resizeFulfilledPopup()}},{key:"getWinnerBonus",value:function(){var e=0;if(this.wheelsExitPopupLimit){var t=this.wheelsExitPopupLimit;t=t>this.data.length?this.data.length:t;var n=Math.floor(t);e=Math.floor(Math.random()*n)}return e}},{key:"generateBonus",value:function(e){var t,n,i=this,o=(null!==(t=storage.getKeitaro())&&void 0!==t?t:[])[0],s=(null!==(n=storage.getAlternativeSponsoredOffers())&&void 0!==n?n:[]).filter(function(e){return!!e.sponsored}),a=s.length>0?s[Math.floor(Math.random()*s.length)]:o;if(!a)return null;var r=a.casino.domain+"?bonus="+a.id,l=document.createElement("div");return l.className="wheels__bonus",l.innerHTML='<div class="wheels__bonus--info">\n\t\t\t<div class="logo" style="background-color: #'.concat(a.casino.background,'">\n\t\t\t\t<img src="').concat(a.casino.logo,'" alt="').concat(a.casino.name,'">\n\t\t\t</div>\n\t\t\t<div class="text">\n\t\t\t\t<p class="label">').concat(this.translate("You won!"),'</p>\n\t\t\t\t<p class="title">').concat(this.translate(a.titleShort,!0),'</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<button class="wheels__bonus--btn">').concat(this.translate("Claim my bonus"),"</button>"),l.addEventListener("click",function(){navAff(r,!0,null,"",a.affiliateUrl?a.affiliateUrl:r);var t={widgetTitle:"Wheels Exit Popup",eventCat:i.eventCat,casinos:i.data,casino:i.data[e],btnText:i.translate("Claim my bonus"),widgetPref:"clickAffLink",clickAffLinkVersion:81,showWidgetVersion:82,eventAffClickName:"
1casino_visit"};setTimeout(function(){i.clickAffLinkAmplitude(t,++i.widgetAffLinkClickIndex)},0),i.closePopup()}),l}},{key:"generateWheel",value:function(){var e=document.createElement("div");e.className="wheels__wrapper";var t=document.createElement("div");t.className="wheels__circle";var n=document.createElement("div");n.className="wheels__circle--inner";var i=this.generateWheelLabel(),o=this.generateWheelSectors(),s=this.generateWheelCenterPin();return n.append.apply(n,_toConsumableArray(o).concat(_toConsumableArray(s))),t.append(n),e.append.apply(e,[t].concat(_toConsumableArray(i))),e}},{key:"generateWheelLabel",value:function(){var e=document.createElement("div");e.className="wheels__label--down";var t=document.createElement("div");return t.className="wheels__label--up",[e,t]}},{key:"generateWheelSectors",value:function(){var e=document.createElement("div");e.className="wheels__content";var t=this.translate("Next Time"),n=this.translate("No Luck"),i=this.data&&this.data[0]?this.translate(this.data[0].titleShort,!0):t,o=n,s=this.data&&this.data[1]?this.translate(this.data[1].titleShort,!0):t,a=this.data&&this.data[2]?this.translate(this.data[2].titleShort,!0):n,r=t,l=this.data&&this.data[3]?this.translate(this.data[3].titleShort,!0):n,c=[i,o,s,a,r,l,i,o,s,a,r,l];c.forEach(function(t,n){var i=document.createElement("div");i.className="wheels__sector",e.append(i)});var u=document.createElement("div");return u.className="wheels__labels",c.forEach(function(e,t){var n=document.createElement("p");n.innerHTML="<span>".concat(e,"</span>"),u.append(n)}),[e,u]}},{key:"generateWheelCenterPin",value:function(){var e=document.createElement("div");e.className="wheels__center";var t=document.createElement("div");return t.className="wheels__center--pin",[e,t]}},{key:"generatePopupCloseBtn",value:function(){var e=this,t=document.createElement("button");return t.className="wheels__close",t.addEventListener("click",function(){return e.closePopup()}),t}},{key:"generateForm",value:function(){var e,t=null!==(e=document.body.dataset.userId)&&void 0!==e?e:null,n=document.createElement("div");n.className="wheels__form--wrapper";var i=document.createElement("div");i.className="wheels__form--text";var o=document.createElement("p");o.className="wheels__form--title",o.innerHTML=this.translate("Ready to win?");var s=document.createElement("p");if(s.className="wheels__form--description",s.innerHTML=this.translate("One spin = instant bonus!"),i.append(o,s),t){var a=document.createElement("div");a.className="wheels__spin-btn",a.innerHTML='<svg class="icon loader-icon" viewBox="0 0 512 512">\n                                        <path d="M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z" />\n                                    </svg>\n                                    <span>'.concat(this.translate("Spin to win!"),"</span>"),n.append(i,a)}else{var r=document.createElement("div");r.className="wheels__form sib-form",r.innerHTML=this.renderEmailPopup(),n.append(i,r)}return n}},{key:"renderSibLinks",value:function(){var e,t=null!==(e=document.body.dataset.userId)&&void 0!==e?e:null,n=document.getElementsByTagName("head")[0],i=document.createElement("link");i.rel="stylesheet",i.type="text/css",i.href="https://sibforms.com/forms/end-form/build/sib-styles.css",i.media="all",t||n.appendChild(i)}},{key:"renderEmailPopup",value:function(){var e=document.body.dataset.geo,t=document.body.dataset.localeLang||"en",n=brevoUtmData(),i="";if(n)for(var o=0,s=Object.entries(n);o<s.length;o++){var a=_slicedToArray(s[o],2),r=a[0],l=a[1];i+='<input type="hidden" id="'.concat(r.toUpperCase(),'" name="').concat(r.toUpperCase(),'" autocomplete="off" value="').concat(l,'" />\n')}return'<div id="sib-form-container" class="sib-form-container">\n        <div id="error-message" class="sib-form-message-panel">\n            <div class="sib-form-message-panel__text sib-form-message-panel__text--center">
1\n                <span class="sib-form-message-panel__inner-text"></span>\n            </div>\n        </div>\n        <div></div>\n        <div id="success-message" class="sib-form-message-panel">\n            <div class="sib-form-message-panel__text sib-form-message-panel__text--center">\n                <span class="sib-form-message-panel__inner-text"></span>\n            </div>\n        </div>\n        <div id="sib-container">\n            <form id="wheels-sib-form" method="POST" action="https://3f7bc7e1.sibforms.com/serve/MUIFAOHtaJSFFL67u-h896XVr6otAeQkC_mxfnb12Fenkj2EU4YQDHVyVz0duha9jXlCq4nZiG0wm9PmJ6974wqwHpxKh7pKVSzkJs6byCYYUUaDuZDmYVMX5pSmrRTsQOjxNfof65DApkKx8i1EnEF3KtQUfh5dHZe1Wk-GoGLj3ZVhrtjUOli6j7o0pHc3CQMrbPu4SYegIqWY" data-type="subscription" autocomplete="off">\n                <div class="sib-input sib-form-block">\n                    <div class="form__entry entry_block">\n                        <div class="form__label-row">\n                            <div class="entry__field">\n                                <input class="input" type="text" id="wheels-EMAIL" name="EMAIL" role="presentation" autocomplete="off" placeholder="'.concat(this.translate("Email"),'" data-required="true" required />\n                            </div>\n                        </div>\n                        <label class="entry__error entry__error--primary"></label>\n                    </div>\n                </div>\n                <input type="hidden" id="COUNTRY" name="COUNTRY" autocomplete="off" value="').concat(e,'" />\n                <input type="hidden" id="DOMAIN" name="DOMAIN" autocomplete="off" value="').concat(document.location.host,'" />\n                ').concat(i,'\n                <div>\n                    <div class="sib-form-block">\n                        <button class="sib-form-block__button sib-form-block__button-with-loader" type="submit">\n                            <svg class="icon clickable__icon progress-indicator__icon sib-hide-loader-icon" viewBox="0 0 512 512">\n                                <path d="M460.116 373.846l-20.823-12.022c-5.541-3.199-7.54-10.159-4.663-15.874 30.137-59.886 28.343-131.652-5.386-189.946-33.641-58.394-94.896-95.833-161.827-99.676C261.028 55.961 256 50.751 256 44.352V20.309c0-6.904 5.808-12.337 12.703-11.982 83.556 4.306 160.163 50.864 202.11 123.677 42.063 72.696 44.079 162.316 6.031 236.832-3.14 6.148-10.75 8.461-16.728 5.01z" />\n                            </svg>\n                            <span>').concat(this.translate("Spin to win!"),'</span>\n                        </button>\n                    </div>\n                </div>\n\n                <input type="text" name="email_address_check" value="" class="input--hidden">\n                <input type="hidden" name="locale" value="').concat(t,'">\n            </form>\n        </div>\n    </div>')}},{key:"isValidEmail",value:function(e){return/^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim())}},{key:"showFormError",value:function(e,t){e&&(e.textContent=t,e.style.display=t?"block":"none")}},{key:"submitSubscription",value:function(e){fetch(e.action,{method:"POST",mode:"no-cors",body:new FormData(e)}).catch(function(){})}},{key:"startSpin",value:function(e,t,n,i,o,s){var a=this,r=this.getWinnerBonus();this.formResize=!1,this.formSuccess=!0,this.loadingSuccess(e,t,n,i,o,r);var l={widgetTitle:"Wheels Exit Popup",eventCat:"w_website_wheels_exit_popup",eventName:"submit",widgetPref:"click",clickAffLinkVersion:30,showWidgetVersion:31,casinos:s,authorized:"false"};setTimeout(function(){a.showBlockAmplitude(l)},0),setTimeout(function(){a.formSuccess=!1,a.formFulfilled=!0,a.loadingFulfilled(i,o,r)},3500)}},{key:"closePopup",value:function(){this.selector.classList.remove("show"),document.body.classList.remove("bonusesPopup__show"),this.selector.innerHTML="",storage.setWheelsExitPopup(!0),this.wheelsExitPopupShown=!0,this.formFulfilled=!1,storage.getShowAuthWheels()&&authPopup.showBannerBySpecialTime(0)}},{key:"showBlockAmplitude",value:function(e){var t=e.casinos,n=void 0===t?[]:t,i=e.widgetTitle,o=e.eventCat,s=e.eventName,a=e.widgetPref,r=e.showWidgetVersion,l=e.authorized,c=n.map(function(e){return e.casino.domain}),u=n.slice(0,10).filter(function(e){return e&&e.code}).length,d=c.filter(function(e,t,n){return n.indexOf(e)===t}).length,m=n.filter(function(e){return!e.affiliateUrl}).length,p=n.slice(0,10).filter(function(e){return e&&!e.affiliateUrl}).length,h=n.filter(function(e){return e.code}).length,f=n.slice(0,10).filter(function(e){return e}).reduce(function(e,t){return e+t.score},0),_=f?(f/n.slice(0,10).filter(function(e){return e}).length).toFixed(1):0,v=n.slice(0,10).filter(function(e){return e&&5===e.score}).length,w=n.slice(0,10).filter(function(e){return e&&e.score>4.5&&e.score<=4.9}).length,y=n.slice(0,10).filter(function(e){return e&&e.score>4&&e.score<=4.5}).length,g=n.slice(0,10).filter(function(e){return e&&e.score<=4}).length,b=document.location.pathname,S=document.location.origin+document.location.pathname,k=document.location.href,E=document.body.dataset.routeBonus,P=document.body.dataset.routeId,L=eventID.findIndex(function(e){return e===E});L>-1||eventID.length;var x=L>-1?eventID[L]:eventID[eventID.length-1];document.body.dataset.localeLang,document.body.dataset.websiteEnv,document.body.dataset.localeCountry;var N=document.body.dataset.geo;"undefined"!=typeof dataLayer&&Array.isArray(dataLayer)&&dataLayer.push(Object.assign({authorized:l,event:"addEvents_".concat(a),event_id:"d-v".concat(document.body.dataset.amplitudeVersion,"-e").concat(r),event_cat:o,event_name:s,page_current_path:JSON.stringify(b),page_url:JSON.stringify(S),page_url_full:JSON.stringify(k),page_group:JSON.stringify(x),widget_title:JSON.stringify(i),widget_id:JSON.stringify(null),page_route_id:JSON.stringify(P),widget_handler:JSON.stringify(null),casino_bonus_short:JSON.stringify(!1),casino_list_user_country:JSON.stringify(N),casino_user_country:JSON.stringify(N),casino_list_for_geo:JSON.stringify(!1),casino_id_list:JSON.stringify(n.map(function(e){return e.casino.casinoId})),casino_domain_list:JSON.stringify(c),casino_bonus_id_list:JSON.stringify(n.map(function(e){return e.id})),casino_domain_bonus_id_list:JSON.stringify(n.map(function(e){return"".concat(e.casino.domain,"_").concat(e.id)}
1)),casino_list_count:JSON.stringify(n.length),casino_list_code_top10_count:JSON.stringify(u),casino_list_casino_unique_count:JSON.stringify(d),casino_list_noafflink_count:JSON.stringify(m),casino_list_noafflink_top10_count:JSON.stringify(p),casino_list_code_count:JSON.stringify(h),casino_score_geo_top10_median:JSON.stringify(_),casino_score_geo_a_top10_count:JSON.stringify(v),casino_score_geo_b_top10_count:JSON.stringify(w),casino_score_geo_c_top10_count:JSON.stringify(y),casino_score_geo_d_top10_count:JSON.stringify(g),website_domain:JSON.stringify(document.location.hostname)},utmParams()))}}])}();export{WheelsExitPopup};

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.