PageSourceSearch

https://ausscasinosanalyzer.com/build/midori/assets/js/components/Header.min.js?v=5801963

js ausscasinosanalyzer.com collected 2026-09-28 11:03:00 UTC 10,288 bytes, 1 lines download raw bytes

1import{deleteCookie,eventID,getCookie,getDeviceInfo,setCookie,utmParams,internalLinkClick as headerInternalLinkClick}from"globals";import{changeCountry}from"../api/auth/authApi";const headerMobBtn=document.querySelector("#headerMobBtn"),headerNav=document.querySelector("#headerNav"),headerNavClose=document.querySelector("#headerNavClose"),authSignupButton=document.querySelector("#authSignupButton"),localeSwitcher=document.querySelector("#localeSwitcher"),localeSwitcherBtn=document.querySelector("#localeSwitcherBtn"),headerMenuMobBtn=document.querySelectorAll('[data-element="header__menu--mob"]'),geoSwitcherNode=document.getElementById("geoSwitcher"),geoSwitcherOriginalParent=geoSwitcherNode?.parentNode||null,geoSwitcherOriginalNextSibling=geoSwitcherNode?.nextSibling||null,moveGeoSwitcherBack=()=>{const e=document.getElementById("geoSwitcher");e&&geoSwitcherOriginalParent&&(geoSwitcherOriginalNextSibling&&geoSwitcherOriginalNextSibling.parentNode===geoSwitcherOriginalParent?geoSwitcherOriginalParent.insertBefore(e,geoSwitcherOriginalNextSibling):geoSwitcherOriginalParent.appendChild(e))},localeSwitcherFn=()=>{if(localeSwitcher){const e=document.querySelectorAll('[data-element="localeSwitcher_list-item"]');e.length&&e.forEach(e=>{e.addEventListener("click",t=>{t.stopPropagation(),t.preventDefault(),document.location.href=e.dataset.href})}),window.innerWidth<=768&&localeSwitcherBtn&&(localeSwitcherBtn.addEventListener("click",e=>{e.stopPropagation(),localeSwitcher.classList.toggle("active")}),document.addEventListener("click",e=>{!localeSwitcher.classList.contains("active")||localeSwitcher.contains(e.target)||localeSwitcherBtn.contains(e.target)||localeSwitcher.classList.remove("active")}))}},headerEventsFn=()=>{storage.getUtmLoggedUserDataLayerPushed()&&authSignupButton&&(authSignupButton.innerHTML="Login"),headerMenuMobBtn.forEach(e=>{e.addEventListener("click",()=>{headerMenuMobBtnToggle(e);const t=document.querySelector("#headerMenuMobList");if(!t)return;t.innerHTML="";const o=e.dataset.name;document.querySelectorAll(`[data-target="${o}"]`).forEach(e=>{const o=e.cloneNode(!0);t.append(o)});const n=t.querySelectorAll('[data-name="internal--link"]');headerInternalLinkClick(n)})}),headerMobBtn?.addEventListener("click",()=>{document.body.classList.add("popupShown"),headerNav?.classList.add("shown");const e=document.getElementById("geoSwitcher"),t=document.querySelector(".header__mob.header__mob-action");e&&t&&t.appendChild(e);const o=document.querySelector('[data-element="header__menu--mob"]');o?.click(),window.addEventListener("resize",handleResize)}),headerNavClose?.addEventListener("click",()=>{headerNav?.classList.remove("shown"),document.body.classList.remove("popupShown"),moveGeoSwitcherBack()});const e=document.querySelector(".header");e&&e.addEventListener("mouseenter",e=>{e.target.closest("#headerMenu .header__menu-item")&&document.dispatchEvent(new CustomEvent("header:closeGeoSwitcher"))},!0)},handleResize=()=>{window.innerWidth>=992&&(headerNav?.classList.remove("shown"),document.body.classList.remove("popupShown"),moveGeoSwitcherBack(),window.removeEventListener("resize",handleResize))},GEO_COUNTRY_REJECTION_EVENT_CAT="geo_country_rejection",getGeoCountryRejectionUtmParams=()=>({utm_source:JSON.stringify("search"),utm_medium:JSON.stringify("search"),utm_campaign:JSON.stringify("none"),utm_content:JSON.stringify("none"),utm_term:JSON.stringify("none"),...utmParams()}),getGeoCountryRejectionAmplitudeContext=()=>{const e=document.body.dataset.routeBonus||"p_other",t=eventID.findIndex(t=>t===e),o=t>-1?t+1:eventID.length,n=t>-1?eventID[t]:eventID[eventID.length-1];return{event_id:`d-v1-e${o}`,page_group:JSON.stringify(n)}},pushGeoCountryRejectionEvent=e=>{try{const{device_width:t,device_height:o,device_ratio:n}=getDeviceInfo(),r=`${document.location.origin}${document.location.pathname}`,a={event_cat:"geo_country_rejection",page_current_path:JSON.stringify(document.location.pathname),page_url:JSON.stringify(r),page_url_full:JSON.stringify(document.location.href),page_route_id:JSON.stringify(document.body.dataset.routeId||""),website_domain:JSON.stringify(document.location.hostname),device_width:t,device_height:o,device_ratio:n};if("popup"===e)return window.dataLayer=window.dataLayer||[],void window.dataLayer.push(Object.assign({event:"addEvents_showBlock",event_name:"popup"},a,getGeoCountryRejectionAmplitudeContext(),getGeoCountryRejectionUtmParams()));window.dataLayer=window.dataLayer||[],window.dataLayer.push(Object.assign({event:"addEvents_click",event_name:e},a,getGeoCountryRejectionAmplitudeContext(),getGeoCountryRejectionUtmParams()))}catch(e){}},trackGeoCountryRejectionPopup=()=>{pushGeoCountryRejectionEvent("popup")},trackGeoCountryRejectionSwitch=()=>{pushGeoCountryRejectionEvent("switch")},headerMenuMobBtnToggle=e=>{const t=document.querySelector('[data-element="header__menu--mob"].active');t&&t.classList.remove("active"),e.classList.add("active")},adminPanelInitFn=async()=>
1{if(getCookie("ca_admin")){if(document.cookie=encodeURIComponent("is_test")+"="+encodeURIComponent(1),!document.querySelector("link[data-admin-panel-style]")){const e=document.createElement("link");e.rel="stylesheet",e.crossOrigin="anonymous",e.dataset.adminPanelStyle="1",e.href="/build/midori/assets/css/adminPanel.css?t="+Date.now(),document.head.appendChild(e)}const{adminPanel:e}=await import("/build/midori/assets/js/adminPanel.js?t="+Date.now());e()}else document.cookie=encodeURIComponent("is_test")+"="+encodeURIComponent(0)},geoSwitcherFn=()=>{const e=".geo_residency_popup-box",t=".return",o=".close, .close_popup",n="#geoSwitcherPopupSearch",r="#geoSwitcherPopupBox",a="#geoSwitcher",i=".geo_residency_popup, .popup, [data-residency-popup]",c=".country",s=".country_name",d=".header",l='[data-element="hotBonusesHeader"]',u='[data-element="hotBonusesPopup"]',m="#headerQuest",h="#headerNav",p=".header_burger",g=".header_overlay",S=".header-mob, .header_mob, #header-mob",y=document.querySelector(e);if(!y)return;const v=y.querySelector(t),w=y.querySelector(o),L=document.querySelector(n),_=document.querySelector(r),f=document.querySelector(a),C=y.closest(i),E=document.querySelector(d),k=document.querySelector(u),b=document.querySelector(h);if(!L||!_)return;const N=Array.from(_.querySelectorAll(c));let q=!1;const B=()=>f?.classList.contains("active"),P=()=>{document.querySelector(p)?.classList.remove("active"),document.querySelector(g)?.classList.remove("active"),document.querySelector(S)?.classList.remove("active")},R=e=>String(e||"").trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,""),U=N.map(e=>({el:e,geo:(e.dataset.geo||"").trim().toUpperCase(),id:(e.dataset.id||"").trim(),name:R(e.querySelector(s)?.textContent)}));let I=_.querySelector("[data-geo-empty]");I||(I=document.createElement("div"),I.dataset.geoEmpty="1",I.className="country country--empty",I.style.display="none",I.innerHTML='<span class="country_name">No countries found</span>
1',_.appendChild(I));const O=(e,t,o=365)=>{const n=new Date;n.setTime(n.getTime()+24*o*60*60*1e3),document.cookie=`${encodeURIComponent(e)}=${encodeURIComponent(t)}; Expires=${n.toUTCString()}; Path=/; SameSite=Lax`},G=e=>{const t=String(e||"").trim().toUpperCase();U.forEach(({el:e,geo:o})=>{e.classList.toggle("active",o===t)})},j=e=>{const t=new URL(location.href);return t.searchParams.set("geo",e.toUpperCase()),t.toString()},x=()=>{const e=R(L.value);let t=0;U.forEach(({el:o,name:n})=>{const r=!e||n.includes(e);o.style.display=r?"":"none",r&&t++}),I.style.display=t?"none":""},D=(e=!0)=>{C?.classList.remove("is-open"),C?.classList.add("is-hidden"),e&&f?.classList.remove("active"),q&&(document.removeEventListener("click",T,!0),q=!1),L.value="",x()},M=()=>{C?.classList.add("is-open"),C?.removeAttribute("inert"),C?.classList.remove("is-hidden"),f?.classList.add("active"),P(),q||(document.addEventListener("click",T,!0),q=!0),L.value="",x(),setTimeout(()=>L.focus(),0)},T=e=>{if(!B())return;const t=e.target;f?.contains(t)||C?.contains(t)||D()};let A;L.addEventListener("input",()=>{clearTimeout(A),A=setTimeout(x,60)}),L.addEventListener("keydown",e=>{if("Escape"===e.key&&(L.value="",x(),L.blur()),"Enter"===e.key){const e=U.find(({el:e})=>"none"!==e.style.display)?.el;e?.click()}}),E&&E.addEventListener("click",e=>{B()&&(e.target.closest(l)||e.target.closest(m))&&D()}),document.addEventListener("header:closeGeoSwitcher",()=>{B()&&D()}),v?.addEventListener("click",e=>{e.preventDefault(),D()}),w?.addEventListener("click",e=>{e.preventDefault(),D(),P(),b?.classList.remove("shown"),document.body.classList.remove("popupShown"),moveGeoSwitcherBack()}),f?.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),k?.classList.contains("show")&&document.dispatchEvent(new CustomEvent("hotBonuses:hide")),C?.classList.contains("is-open")?D():M()});const J=async(e,t=null)=>{const o=String(e||"").trim().toUpperCase(),n=o||"US",r=t||(e=>{const t=String(e||"").trim().toUpperCase();return t&&"US"!==t?U.find(e=>e.geo===t)?.id||null:U.find(e=>""===e.geo)?.id||null})(n);O("user_geo",n),G("US"===n?"":n),document.body.dataset.userId&&r&&await changeCountry(r),location.href=j(n)},F=(C?.dataset.currentGeo||(e=>{const t=document.cookie.match(new RegExp(`(?:^|;\\s*)${e}=([^;]*)`));return t?decodeURIComponent(t[1]):null})("user_geo")||"").trim().toUpperCase();G(F&&"US"!==F?F:""),_.addEventListener("click",async e=>{const t=e.target.closest(c);if(!t||!_.contains(t))return;const o=(t.dataset.geo||"").trim().toUpperCase(),n=(t.dataset.id||"").trim(),r=window.frontScreenLockModal,a=window.frontScreenLockWidget;if(o&&a?.shouldConfirmGeoSwitch?.(o)&&r)return D(),trackGeoCountryRejectionPopup(),void r.open({confirmText:"Stay on current region",detailsText:"I understand - switch anyway",onConfirm:()=>{r.close()},onDetails:()=>{trackGeoCountryRejectionSwitch(),r.close(),setTimeout(()=>{(e=>{if(!e)return deleteCookie("user_geo"),G(""),void(location.href=j("US"));O("user_geo",e,365),G(e),location.href=j(e)})(o)},300)},onClose:null});await J(o,n)}),(()=>{try{const e=new URL(location.href);if(!e.searchParams.has("geo"))return;e.searchParams.delete("geo"),history.replaceState({},document.title,e.toString())}catch(e){}})(),x()};export{localeSwitcherFn,headerEventsFn,adminPanelInitFn,geoSwitcherFn};

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.