PageSourceSearch

https://www.flashscore.si/res/_fs/build/initBannerHandlerLegacy.db648ff.js

js flashscore.si collected 2026-09-25 09:40:53 UTC 5,138 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkflashscore=self.webpackChunkflashscore||[]).push([[3676],{5582(e,n,t){t.d(n,{BannerHandlerLegacyInitializer:()=>u});var i=t(83218),s=t(27716),o=t(34147);function a(e,n,t,i,s,o,a){try{var r=e[o](a),l=r.value}catch(e){return void t(e)}r.done?n(l):Promise.resolve(l).then(i,s)}var r,l=function(){var e,n=(e=function*(e,n){if("IT"===(yield n)&&e.skipLabel){var t=document.querySelector("#zoneContainer-"+e.name+" .zone__label");t&&(t.style.visibility="hidden")}},function(){var n=this,t=arguments;return new Promise(function(i,s){var o=e.apply(n,t);function r(e){a(o,i,s,r,l,"next",e)}function l(e){a(o,i,s,r,l,"throw",e)}r(void 0)})});return function(e,t){return n.apply(this,arguments)}}(),d=t(20026),c=t(65827);!function(e){e[e.HIDDEN=0]="HIDDEN",e[e.DISPLAYED=1]="DISPLAYED"}(r||(r={}));class u extends i.W{constructor(){super(...arguments),this.boundCompatGroups=new Set,this.legacyGeoIpPromise=null}initDefer(){this.isDestroyed||(this.init(),this.adLogger.event("AdManager disabled, starting legacy BannerHandler logic."),this.initializeLegacyBannerHandler())}initDetail(){this.isDestroyed||(this.init(),this.adLogger.event("AdManager disabled (Detail context), using legacy logic."),this.initializeLegacyBannerHandler())}initLite(){var e;if(!this.isDestroyed){this.init(!0);var{zones:n}=null!=(e=this.window.bannerHandlerSettings)?e:{};this.window.document.querySelectorAll('[id^="zoneContainer"]').forEach(e=>{var t=e.getAttribute("data-zone-group");t&&null!=n&&n[t]&&this.window.bannerHandler.registerZoneGroup(n[t]).getEvents().onRequestError((e,t,i)=>{var s;if(!this.isDestroyed){var o=null!=(s=n[e.name].fallbackZoneId)?s:0;o&&this.window.bannerHandler.replaceZone(i.zoneId,o)}})}),this.window.bannerHandler.getEvents().onRequestSuccess(()=>{this.isDestroyed||this.window.config.googleAnalyticsEnable&&(o.H.bindAdsCallbackClick(this.window.config.sport),o.H.listenForMessage())})}}initApp(e){var n,t,i,s,o,a,r=this.window.bannerHandlerSettings.options.deviceParams;r.package=null!=(n=null==(t=this.window.APP_PARAMS)?void 0:t.package)?n:r.package,r.platform=null!=(i=null==(s=this.window.APP_PARAMS)?void 0:s.platform)?i:r.platform,r.version=null!=(o=null==(a=this.window.APP_PARAMS)?void 0:a.version)?o:r.version,this.init();var l=this.window.bannerHandler,d=l.getZoneGroup(e.name);return d||(d=l.registerZoneGroup(e)),this.boundCompatGroups.has(e.name)||(this.initAppBackwardCompatibility(d.getEvents()),this.boundCompatGroups.add(e.name)),l.setBettingConsent(null),l}initAppBackwardCompatibility(e){var n=this.window;n.banners||(n.banners={zones:{},zoneStateCallbacks:[],addZoneStateCallback:e=>n.banners.zoneStateCallbacks.push(e)}),e.onRequestSuccess((e,t)=>{if(!this.isDestroyed){n.banners.zones[t.zoneId]={bannerId:t.id};var i={};i[t.zoneId]=r.DISPLAYED,n.banners.zoneStateCallbacks.forEach(e=>e(i))}}),e.onRequestError((e,t,i)=>{if(!this.isDestroyed){var s={};s[i.zoneId]=r.HIDDEN,n.banners.zoneStateCallbacks.forEach(e=>e(s))}})}destroy(){super.destroy(),this.boundCompatGroups.clear(),this.legacyGeoIpPromise=null}initializeLegacyBannerHandler(){var e=this.createUtilConfig(),n=this.createUtilEnv();this.legacyGeoIpPromise=new Promise(e=>{n.getGeoIp(n=>{e(n),this.isDestroyed||this.window.bannerHandler.setBettingConsent(this.getBettingConsent(n))})});var t=this.window.bannerHandlerSettings;null!=t&&t.zones?(this.window.document.querySelectorAll('[id^="'+d.wf+'"]').forEach(e=>{var n=e.getAttribute("data-zone-group");n&&this.registerLegacyZone(n)}),this.window.__adZoneMount=e=>{this.isDestroyed||this.registerLegacyZone(e)},this.resolveBoxOverContentClassName(),this.boundGlobalEvents||(this.window.bannerHandler.getEvents().onRequestSuccess(()=>{this.isDestroyed||e.get("app","google_analytics","enable")&&o.H.bindAdsCallbackClick(this.window.sport)}),this.boundGlobalEvents=!0)):this.adLogger.warn("Legacy init: No zones defined in settings.")}registerLegacyZone(e){var n,t,i=null!=(n=null==(t=this.window.bannerHandlerSettings)?void 0:t.zones)?n:{},s=i[e];if(s){var o=this.window.bannerHandler,a=o.getZoneGroup(e);if(a)a.getLastBannerResponse()&&a.forceRender();else if(!this.boundCompatGroups.has(e)){var r=o.registerZoneGroup(s);r.getEvents().onRequestSuccess(e=>{this.isDestroyed||l(i[e.name],this.legacyGeoIpPromise)}).onRenderSuccess((e,n)=>{var t,i,s;
1this.isDestroyed||(t=e.name,i=n.content,t.match(/background|wallpaper/)&&i.includes("\x3c!-- fixed --\x3e")&&(null==(s=document.getElementById("zoneContainer-"+t))||s.classList.add("zone--fixed")))}),"fsnews_article"===e&&r.getEvents().onRequestSuccess((n,t)=>{if(!this.isDestroyed){var i=t.width===c.G.width&&t.height===c.G.height,s=this.window.document.getElementById((0,d.JG)(e));s&&s.classList.toggle("interscroller",i)}}),this.boundCompatGroups.add(e)}}}resolveBoxOverContentClassName(){[s.b.BOX_OVER_CONTENT,s.b.DETAIL_BOX_OVER_CONTENT].forEach(e=>{var n;null==(n=this.window.bannerHandler.getZoneGroup(e))||n.getEvents().onRequestSuccess((n,t)=>{var i;this.isDestroyed||t.content.includes("box-over-content")&&(null==(i=this.window.document.getElementById((0,d.JG)(e)))||i.classList.add("isBoxOverContent"))})})}}}}]);

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.