1!function(){"use strict";const e={initialized:!1,requestInFlight:!1,pendingRequestOptions:null,pendingData:null,hasSeenModal:function(){return null!==localStorage.getItem(this.modalShownKey)},hasActiveStoredCoupon:function(){var e=localStorage.getItem(this.storageKey);return Boolean(e&&"expired"!==e)},shouldBlockFurtherRequests:function(){return this.hasSeenModal()&&!this.hasActiveStoredCoupon()},appendHoneypotFields:function(e){document.querySelectorAll('input[name="jtl_token"]').forEach(function(t){for(var o=t.nextElementSibling;o&&o.matches(".hidden.d-none");)o.querySelectorAll('input[type="text"][name]').forEach(function(t){""!==t.value||e.has(t.name)||e.append(t.name,"")}),o=o.nextElementSibling})},init:function(e,t,o,n,i,s){if(!this.initialized){this.initialized=!0,this.endpoint=e,this.frontendUrl=t,this.couponName=o,this.storageKey="discount_timer_modal_"+o,this.modalShownKey="discount_timer_modal_shown_"+o,this.hasPendingCoupon=!0===n,this.countdownAssets=i,this.assets=s;var d=this;jQuery(document).on("evo:loaded.io.request",function(e,t){t.req&&"pushToBasket"===t.req.name&&"success"===t.status&&d.triggerLoad()}),this.shouldBlockFurtherRequests()||(this.hasPendingCoupon&&this.triggerLoad(),this.hasActiveStoredCoupon()&&this.triggerLoad())}},loadDiscountTimer:function(e){var t=!1!==(e||{}).showModal;if(this.requestInFlight)return void(this.pendingRequestOptions?this.pendingRequestOptions.showModal=this.pendingRequestOptions.showModal||t:this.pendingRequestOptions={showModal:t});this.requestInFlight=!0;const o=new FormData;o.append("jtl_token","undefined"!=typeof lsCacheTokens&&null!==lsCacheTokens&&Object.prototype.hasOwnProperty.call(lsCacheTokens,"jtl_token")?String(lsCacheTokens.jtl_token??""):window.admorris_jtlToken||""),this.appendHoneypotFields(o);var n=this;fetch(this.endpoint,{method:"POST",credentials:"include",body:o}).then(function(e){return e.json()}).then(function(e){if(!n.pendingRequestOptions)if(e.success&&e.html){var o=localStorage.getItem(n.storageKey),i=localStorage.getItem(n.modalShownKey);if(null!==i&&e.couponCode&&e.couponCode!==i)return void localStorage.setItem(n.storageKey,"expired");e.couponCode&&e.couponCode!==o&&localStorage.removeItem(n.storageKey),e.showModal=t&&null===i,n.handleResponse(e)}else localStorage.setItem(n.storageKey,"expired")}).catch(function(e){console.error("Discount timer load failed:",e)}).finally(function(){n.requestInFlight=!1;var e=n.pendingRequestOptions;n.pendingRequestOptions=null,e&&n.loadDiscountTimer(e)})},handleResponse:function(e){this.pendingData=e;var t=this;loadjs.isDefined("dtCSS")||loadjs(this.assets.styles,"dtCSS");var o=window.admCountdownAssetLoader.load({context:"DiscountTimerLoader",engineScripts:this.countdownAssets.engineScripts,flipStyles:this.countdownAssets.flipStyles,needsFlip:e.showModal});o&&(loadjs.ready(o,{success:function(){loadjs.isDefined("dtModal")||loadjs(t.assets.modal,"dtModal"),loadjs.isDefined("dtWidget")||loadjs(t.assets.widget,"dtWidget")},error:function(e){console.error("[DiscountTimerLoader] Failed to load countdown assets:",e)}}),loadjs.ready(["dtCSS","dtModal","dtWidget"],{success:function(){t.injectAndInitialize()},error:function(e){console.error("[DiscountTimerLoader] Failed to load assets:",e)}}))},injectAndInitialize:function(){if(!this.pendingData)return;const e=this.pendingData;document.querySelectorAll(".admorris-discount-timer-container, #discount_timer_widget").forEach(function(e){window.admCountdownEngine&&window.admCountdownEngine.destroyAll(e),e.remove()}),$("body").append(e.html),e.showWidget&&(window.DiscountTimerWidgetPending={couponName:e.couponName,couponCode:e.couponCode,validityIso:e.validityIso,now:e.now,metaLanguage:e.metaLanguage}),e.showModal&&window.DiscountTimerModal?window.DiscountTimerModal.init({couponName:e.couponName,couponCode:e.couponCode,validityIso:e.validityIso,now:e.now,metaLanguage:e.metaLanguage}):e.showWidget&&window.DiscountTimerWidget&&(window.DiscountTimerWidget.init(window.DiscountTimerWidgetPending),window.DiscountTimerWidgetPending=null),this.pendingData=null},triggerLoad:function(){if(!this.shouldBlockFurtherRequests()){var e=this,t=!this.hasSeenModal();setTimeout(function(){e.loadDiscountTimer({showModal:t})},100)}},autoInit:function(){var e=document.getElementById("discount_timer_loader_config");if(e){try{var t=JSON.parse(e.textContent)}catch(e){return void console.error("Failed to parse discount timer config:",e)}var o=t.endpoint||"",n=t.frontendUrl||"",i=t.couponName||"",s=!0===t.hasPending,d=t.countdownAssets||{},a=t.assets||{},r=Array.isArray(d.engineScripts)?d.engineScripts:[],l=Array.isArray(d.flipStyles)?d.flipStyles:[];o&&n&&i&&r.length&&l.length&&a.styles&&a.modal&&a.widget?this.init(o,n,i,s,d,a):console.error("Error in discount timer config")}else console.error("Failed to read discount timer config")}};window.DiscountTimerLoader=e,window.DiscountTimerLoader.autoInit()}();
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.