PageSourceSearch

https://casinosanalyzer.ca/build/midori/assets/js/popups/hotBonusesPopup.min.js?v=5801963

js casinosanalyzer.ca collected 2026-09-25 23:52:37 UTC 5,308 bytes, 1 lines download raw bytes

1import{buildExternalId,utmParams as utmParamsHotBonuses,getLocaleCountry as __hotBonuses_localeCountry}from"globals";import{__translate as __hotBonuses_translate}from"translate";class HotBonuses{hotBonusesHeader=document.querySelector('[data-element="hotBonusesHeader"]');hotBonusesPopup=document.querySelector('[data-element="hotBonusesPopup"]');hotBonusesPopupBody=document.querySelector('[data-element="hotBonusesPopupBody"]');hotBonusesPopupPromo=document.querySelectorAll('[data-element="hotBonusesPopupPromo"]');hotBonusesCards=document.querySelectorAll('[data-element="bonus_hot"]');translate(e,t=!1){return __hotBonuses_translate(e,__hotBonuses_localeCountry()||"en",t)||e}init(){this.handleHeaderBtn(),this.handlePopupClose(),this.handlePopupBody(),this.handlePopupPromo(),this.handleAffClick(),this.handleExternalClose(),this.handleAdminPanel()}show({elevated:e=!1}={}){this.hotBonusesPopup&&(this.hotBonusesPopup.classList.contains("show")||(e?this.hotBonusesPopup.classList.add("elevated"):document.body.classList.add("popupShown"),this.hotBonusesPopup.classList.add("show"),this.isAdminPanelShown()))}hide(){if(!this.hotBonusesPopup)return;const e=this.hotBonusesPopup.classList.contains("elevated");this.hotBonusesPopup.classList.remove("show"),this.hotBonusesPopup.classList.remove("elevated"),e||document.body.classList.remove("popupShown")}handleHeaderBtn(){this.hotBonusesHeader&&this.hotBonusesHeader.addEventListener("click",e=>{e.stopPropagation();this.hotBonusesPopup.classList.contains("show")?this.hide():(this.show(),setTimeout(()=>{this.setAmplitudeParams("click","w_website_placement_hotOffer_header","view")},0))});const e=document.querySelector("#headerMobBtn");e&&e.addEventListener("click",()=>{this.hotBonusesPopup.classList.contains("show")&&this.hide()})}handlePopupClose(){this.hotBonusesPopup&&this.hotBonusesPopup.addEventListener("click",e=>{e.stopPropagation();this.hotBonusesPopup.classList.contains("show")&&this.hide()})}handlePopupBody(){this.hotBonusesPopupBody&&this.hotBonusesPopupBody.addEventListener("click",e=>{e.stopPropagation()})}copyText(e){return navigator.clipboard.writeText(e)}handlePopupPromo(){if(this.hotBonusesPopupPromo.length){const e=e=>new Promise(t=>setTimeout(t,e));this.hotBonusesPopupPromo.forEach(t=>{t.addEventListener("click",o=>{o.stopPropagation(),o.preventDefault();const s=t.dataset.code;if(!s)return;const n=t.querySelector(".code");this.copyText(s).then(async()=>{n&&(n.innerHTML=this.translate("Copied!"),await e(1500),n.innerHTML=s)})})})}}handleAffClick(){this.hotBonusesCards.length&&this.hotBonusesCards.forEach((e,t)=>{e.addEventListener("click",t=>{if(t.target.closest('a[href^="/redirect?"]')){t.stopPropagation();let o=storage.getPageAffLinkClickIndex();o++,storage.setPageAffLinkClickIndex(o);const s={casino_domain:JSON.stringify(e.dataset.domain),casino_bonus_id:JSON.stringify(e.dataset.id),casino_bonus_title_short:JSON.stringify(e.querySelector('[data-element="bonus_title"]').innerHTML),sponsored:JSON.stringify(!(!e.dataset.promo&&!e.dataset.hotOffer)),widget_id:JSON.stringify(56376),page_afflink_click_index:JSON.stringify(o)};return void setTimeout(async()=>{const t=await buildExternalId(e.dataset.id);this.setAmplitudeParams("clickAffLink","w_website_placement_hotOffer_header","casino_visit",{...s,...t?{external_id:JSON.stringify(t)}:{}})},0)}})})}handleExternalClose(){document.addEventListener("hotBonuses:hide",()=>this.hide())}setAmplitudeParams=(e,t,o,s={})=>{const n=["p_bonus_spin_n","p_bonus_amount","p_bonus_casino","p_bonus_category","p_bonus_country","p_bonus_percent","p_casino_category","p_casino_city","p_casino_country","p_casino_state_usa","p_casino_currency","p_casino_deposit_low","p_casino_payment","p_casino","p_casino_slot_soft","p_game_category","p_slot_category","p_slot","p_slot_payline","p_blog_category","p_blog_article","p_website_category","p_similar_casinos","p_software_bonuses","p_website_page","p_profile_rewards","p_profile_shop","p_home","p_promo_codes_category","p_other"],a=document.body.dataset.routeBonus,i=n.findIndex(e=>e===a),r=i>
1-1?n[i]:n[n.length-1],u=document.location.href,d={page_url:JSON.stringify(document.location.origin+document.location.pathname),page_url_full:JSON.stringify(u),page_route_id:JSON.stringify(document.body.dataset.routeId),page_current_path:JSON.stringify(document.location.pathname),page_group:JSON.stringify(r),website_domain:JSON.stringify(document.location.hostname),website_country:JSON.stringify(document.body.dataset.geo)};dataLayer?.push(Object.assign({event:`addEvents_${e}`,event_id:"d-v1-e1",event_cat:t,event_name:o},d,utmParamsHotBonuses(),s))};isAdminPanelShown(){const e=document.querySelector(".adminPanel");if(e&&!e.classList.contains("hidden")){const t=e.offsetHeight,o=document.querySelector(".header").offsetHeight;this.hotBonusesPopup.style.top=`${t+o}px`}}handleAdminPanel(){const e=document.querySelector(".adminPanel");if(e){e.querySelector(".hidePanel").addEventListener("click",()=>{const e=document.querySelector(".header").offsetHeight;this.hotBonusesPopup.style.top=`${e}px`});e.querySelector(".panelShowBtn").addEventListener("click",()=>{const t=e.offsetHeight,o=document.querySelector(".header").offsetHeight;this.hotBonusesPopup.style.top=`${t+o}px`})}}}const hotBonuses=new HotBonuses;export{hotBonuses};

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.