1(function($){'use strict';$(function(){let is_busy_ajax_proxy=!1;const clearQueue=()=>{is_busy_ajax_proxy=!1};const shortcodes={campaign_compare_view:{wrapper:'.campaign-compare-view-shortcode',offer:'.campaign-shortcode__compare-view__row-data',},recommended_offers:{wrapper:'.recommended-offers-widget',offer:'.recommended-offers-widget_tile',},popup_offers:{wrapper:'.popup-offers-widget__wrapper',offer:'.popup-offers-widget__offer',},};const fetchShortcode=(shortcode_wrapper,type)=>{if(typeof shortcodes[type].wrapper==='undefined'||typeof shortcodes[type].offer==='undefined'){return} 2const $shortcode_wrapper=$(shortcode_wrapper).first();setRefCookie();return new Promise(function(resolve,reject){is_busy_ajax_proxy=!0;const shortcode_id=$($shortcode_wrapper).attr('data-id');const attribute_display=$($shortcode_wrapper).attr('data-display');const attribute_logo=$($shortcode_wrapper).attr('data-logo');const attribute_variant=$($shortcode_wrapper).attr('data-variant');const attribute_layout=$($shortcode_wrapper).attr('data-layout');const params=new URLSearchParams(window.location.search);const getVariables={};params.forEach((value,key)=>{getVariables[key]=value});$.ajax({method:'POST',url:likes_handler.url,data:{action:'get_shortcode_html',id:shortcode_id,nonce:likes_handler.nonce,type,current_url:window.location.href,attribute_display,attribute_logo,attribute_variant,attribute_layout,get_variables:getVariables,visitor_screen_width:$(window).width(),},success:function(response){const offers=$(response).find(shortcodes[type].offer);if($(offers).length===0){$($shortcode_wrapper).addClass('empty').html('');disableRelatedEvents(type);reject('No offers have been received.')} 3if($(response).is(shortcodes[type].wrapper)===!1){$($shortcode_wrapper).addClass('empty').html('');disableRelatedEvents(type);reject("Didn't get the table.")} 4$($shortcode_wrapper).html($(response).html());maybeEnqueuePartnerLabelCss($shortcode_wrapper);$shortcode_wrapper.trigger('html-replaced');$($shortcode_wrapper).addClass('rebuilt');if(typeof window.dataLayer_initCampaignEvents==='function'){window.dataLayer_initCampaignEvents($shortcode_wrapper)} 5clearQueue();resolve(response)},error:function(error){clearQueue();reject(error)},})})};const disableRelatedEvents=(type)=>{if(type==='popup_offers'&&typeof window.BM_disablePopupEvents==='function'){window.BM_disablePopupEvents()}};const maybeEnqueuePartnerLabelCss=($shortcode_wrapper)=>{if($($shortcode_wrapper).find('.campaign__partner-label-wrapper').length>0){const partnerLabelCssUrl=window.likes_handler&&likes_handler.partner_label_css_url?likes_handler.partner_label_css_url:'/wp-content/plugins/brand-management-plugin/public/css/bm-partner-label.css';let normalizedCssUrl;try{normalizedCssUrl=new URL(partnerLabelCssUrl,window.location.origin).href}catch(e){normalizedCssUrl=partnerLabelCssUrl} 6const isPartnerLabelCssLoaded=Array.from(document.querySelectorAll('link[rel="stylesheet"]')).some((link)=>link.href===normalizedCssUrl);if(!isPartnerLabelCssLoaded){const partnerLabelCssLink=document.createElement('link');partnerLabelCssLink.rel='stylesheet';partnerLabelCssLink.href=partnerLabelCssUrl;document.head.appendChild(partnerLabelCssLink)}}};window.BM_tryRebuildShortcodesByGeoFilters=function tryRebuildShortcodesByGeoFilters(type,rebuildCallback=()=>{},selectors={}){if(jQuery.isEmptyObject(selectors)===!1){shortcodes[type]=selectors} 7if(typeof likes_handler==='undefined'){return} 8if(typeof shortcodes[type].wrapper==='undefined'){return} 9const shortcodes_selector=shortcodes[type].wrapper+'.require_ajax_update:not(.rebuilt)';const $shortcodes=$('body').find(shortcodes_selector);if($shortcodes.length===0){return} 10$shortcodes.each(function(){const $shortcode_wrapper=$(this);if(is_busy_ajax_proxy===!1){$shortcode_wrapper.on('html-replaced',async function(){rebuildCallback($shortcode_wrapper)});fetchShortcode($shortcode_wrapper,type,rebuildCallback).catch((error)=>{console.log(error)})}else{const awaitQueue=setInterval(function(){if(is_busy_ajax_proxy===!1){clearInterval(awaitQueue);tryRebuildShortcodesByGeoFilters(type,rebuildCallback)}},600)}})};setRefCookie()});const setRefCookie=()=>{const cookieName='c1baf2b75f5bb1dc286d84e206931fc6';const cookieValue=document.cookie.split(';').map((c)=>c.trim()).find((c)=>c.startsWith(cookieName+'='));if(cookieValue?.split('=')[1]?.startsWith('$'))return;let referrer='';try{referrer=document.referrer?new URL(document.referrer).host:''}catch(e){} 11const cookieValueToStore=`$${referrer || window.location.host}`;const cookieMaxAge=31536000;document.cookie=`${cookieName}=${cookieValueToStore}; Path=/; Max-Age=${cookieMaxAge}; SameSite=Lax; Secure`}})(jQuery)
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.