PageSourceSearch

https://www.flashscore.com.my/res/_fs/build/bonusComparisonGift.56fcea6.js

js flashscore.com.my collected 2026-09-25 12:31:22 UTC 7,142 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkflashscore=self.webpackChunkflashscore||[]).push([[7949],{12431(e,i,t){t.d(i,{j:()=>s});var o="data_ttl";class s{static get(e){if(s.isValidKey(e)){var i=window.localStorage.getItem(e);if(i){var t=s.getValidToForLocalStorage(e);return s.isValid(t)||0===t?i:null}}return null}static store(e,i,t){void 0===t&&(t=0),s.isValidKey(e)&&(s.storeValidToForLocalStorage(e,t),window.localStorage.setItem(e,i))}static drop(e){s.isValidKey(e)&&(s.deleteValidToForLocalStorage(e),window.localStorage.removeItem(e))}static getSession(e){if(s.isValidKey(e)){var i=s.getValidToForSession(e);return s.isValid(i)||0===i?window.sessionStorage.getItem(e):null}return null}static storeSession(e,i,t){void 0===t&&(t=0),s.isValidKey(e)&&(s.storeValidToForSession(e,t),window.sessionStorage.setItem(e,i))}static deleteSession(e){s.isValidKey(e)&&(s.deleteValidToForSession(e),window.sessionStorage.removeItem(e))}static isValidKey(e){return e!==o}static storeValidToForLocalStorage(e,i){s.storeValidTo(e,i,window.localStorage)}static storeValidToForSession(e,i){s.storeValidTo(e,i,window.sessionStorage)}static storeValidTo(e,i,t){if(i){var a=t.getItem(o)||"{}",n=s.getTimestampNow();try{var l=JSON.parse(a);l[e]=n+i,t.setItem(o,JSON.stringify(l))}catch(s){t.setItem(o,JSON.stringify({[e]:n+i}))}}}static deleteValidToForLocalStorage(e){s.deleteValidTo(e,window.localStorage)}static deleteValidToForSession(e){s.deleteValidTo(e,window.sessionStorage)}static deleteValidTo(e,i){var t=i.getItem(o);if(t)try{var s=JSON.parse(t);delete s[e],i.setItem(o,JSON.stringify(s))}catch(e){i.setItem(o,"{}")}}static getValidToForLocalStorage(e){return s.getValidTo(e,window.localStorage)}static getValidToForSession(e){return s.getValidTo(e,window.sessionStorage)}static getValidTo(e,i){var t=i.getItem(o);if(t)try{var s=JSON.parse(t);return s[e]?s[e]:0}catch(e){return 0}return 0}static isValid(e){return e>=s.getTimestampNow()}static getTimestampNow(){return Math.round(Date.now()/1e3)}static getExpiresDate(e){if(e){var i=new Date;return i.setTime(i.getTime()+1e3*e),"expires="+i.toUTCString()+";"}return""}static getPath(e){return e?"path="+e:""}}},39610(e,i,t){t.d(i,{Y:()=>o,h:()=>s});var o="*";function s(e,i){var t,s=null!=e?e:{};return null!=(t=s[i])?t:s[o]}},10348(e,i,t){var o=t(12431),s=t(40535),a=t(5557),n="bonus_comparison_gift",l="wasVisited",r="bonus-comparison-gift";(new class{constructor(){this.giftClickHandler=void 0,this.giftClickHandler=this.handleGiftClick.bind(this)}init(){var e;o.j.get(n)?null==(e=this.getGiftElement())||e.classList.add(l):this.addGiftClickListener()}handleGiftClick(){var e;null==(e=this.getGiftElement())||e.classList.add(l),o.j.store(n,l),this.removeGiftClickListener()}addGiftClickListener(){var e;null==(e=this.getGiftElement())||e.addEventListener("click",this.giftClickHandler)}removeGiftClickListener(){var e;null==(e=this.getGiftElement())||e.removeEventListener("click",this.giftClickHandler)}getGiftElement(){return document.getElementById(r)}}).init(),cjs.Api.loader.get("geoIpResolver").call(e=>{var i,t,o,n=window.headerMenuEnvironment,l=(0,s.F)(null!=(i=null==n?void 0:n.legalAgeConfig)?i:{enabled:!1,geo_policies:{}},e),d=null!=(t=null==n?void 0:n.giftUrls)?t:{}
1,g=l.mustBeConfirmed()&&l.userMadeConfirmation()&&!l.isConfirmed(),u=a.S.getInstance().getGeoIpIsoSubdivisionCode0(),p=u&&d[u]?u:e;if(d[p]&&!g){var v=document.getElementById(r);null==v||v.setAttribute("href",d[p]),null==v||v.classList.add("isVisible")}g&&(null==(o=document.querySelector(".page-betting-offers"))||null==(o=o.closest(".selfPromo__boxItemWrapper"))||o.remove())})},5557(e,i,t){t.d(i,{S:()=>GeoIpStorageImpl});var o=t(12431),s="geoip";class GeoIpStorageImpl{static getInstance(){return GeoIpStorageImpl.instance||(GeoIpStorageImpl.instance=new GeoIpStorageImpl),GeoIpStorageImpl.instance}constructor(){this.globalGeoIp=null,this.geoIpCityName=null,this.geoIpSubdivisionName0=null,this.geoIpSubdivisionCode0=null,this.geoIpIsoSubdivisionCode0=null,this.geoIpSubdivisionName1=null;var e=this.getStoredData();e&&(this.globalGeoIp=e.globalGeoIp,this.geoIpCityName=e.geoIpCityName,this.geoIpSubdivisionName0=e.geoIpSubdivisionName0,this.geoIpSubdivisionCode0=e.geoIpSubdivisionCode0,this.geoIpIsoSubdivisionCode0=e.geoIpIsoSubdivisionCode0,this.geoIpSubdivisionName1=e.geoIpSubdivisionName1)}getGlobalGeoIp(){return this.globalGeoIp}getGeoIpCityName(){return this.geoIpCityName}getGeoIpSubdivisionName0(){return this.geoIpSubdivisionName0}getGeoIpSubdivisionCode0(){return this.geoIpSubdivisionCode0}getGeoIpIsoSubdivisionCode0(){return this.geoIpIsoSubdivisionCode0}getGeoIpSubdivisionName1(){return this.geoIpSubdivisionName1}getGeoIpWithSubdivision(){var e,i;return this.getGlobalGeoIp()&&this.getGeoIpIsoSubdivisionCode0()?(null!=(e=this.getGlobalGeoIp())?e:"")+":"+(null!=(i=this.getGeoIpIsoSubdivisionCode0())?i:""):"default"}getAsGlobalHeaders(){var e,i,t,o,s,a;return{"X-Geoip2-Country-Code":null!=(e=this.getGlobalGeoIp())?e:void 0,"X-Geoip2-City-Name":null!=(i=this.getGeoIpCityName())?i:void 0,"X-Geoip2-Subdivision-Name-0":null!=(t=this.getGeoIpSubdivisionName0())?t:void 0,"X-Geoip2-Subdivision-Code-0":null!=(o=this.getGeoIpSubdivisionCode0())?o:void 0,"X-Geoip2-ISO-Subdivision-Code-0":null!=(s=this.getGeoIpIsoSubdivisionCode0())?s:void 0,"X-Geoip2-Subdivision-Name-1":null!=(a=this.getGeoIpSubdivisionName1())?a:void 0}}set(e,i,t,a,n,l){this.globalGeoIp=e||this.globalGeoIp,this.geoIpCityName=i||this.geoIpCityName,this.geoIpSubdivisionName0=t||this.geoIpSubdivisionName0,this.geoIpSubdivisionCode0=a||this.geoIpSubdivisionCode0,this.geoIpIsoSubdivisionCode0=n?n.replace("-",""):this.geoIpIsoSubdivisionCode0,this.geoIpSubdivisionName1=l||this.geoIpSubdivisionName1;var r={globalGeoIp:this.globalGeoIp,geoIpCityName:this.geoIpCityName,geoIpSubdivisionName0:this.geoIpSubdivisionName0,geoIpSubdivisionCode0:this.geoIpSubdivisionCode0,geoIpIsoSubdivisionCode0:this.geoIpIsoSubdivisionCode0,geoIpSubdivisionName1:this.geoIpSubdivisionName1};o.j.store(s,JSON.stringify(r))}getStoredData(){var e=o.j.get(s);return e?JSON.parse(e):null}}GeoIpStorageImpl.instance=void 0},40535(e,i,t){t.d(i,{F:()=>n});var o=t(39610),s="legal_age_confirmation";class a{constructor(e,i,t,o){this.enabled=void 0,this.gatedGeoIps=void 0,this.userGeoIp=void 0,this.gamblingOptOutEnabled=void 0,this.enabled=e,this.gatedGeoIps=i,this.userGeoIp=t,this.gamblingOptOutEnabled=o}mustBeConfirmed(){return this.enabled&&(this.gatedGeoIps.includes(o.Y)||this.gatedGeoIps.includes(this.userGeoIp))}isConfirmed(){if(!this.mustBeConfirmed())return!0;if("undefined"==typeof window)return!1;var e="1"===window.localStorage.getItem(s);if(this.gamblingOptOutEnabled){var i="1"===window.localStorage.getItem("legal_age_gambling_opt_out");return e&&!i}return e}userMadeConfirmation(){return!this.mustBeConfirmed()||"undefined"!=typeof window&&null!==window.localStorage.getItem(s)}}function n(e,i){var t,s,n=null!=(t=null==e?void 0:e.geo_policies)?t:{},l=(0,o.h)(n,i),r="overlay"===(null==l?void 0:l.mode)&&l.overlay.showGamblingOptOut||!1;return new a(null!=(s=null==e?void 0:e.enabled)&&s,Object.keys(n),i,r)}}},e=>{var i;i=10348,e(e.s=i)}]);

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.