@pronto-tools-and-more/files 14.0.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_ad_ad_module_ts"],{3394:(Y,C,c)=>{c.r(C),c.d(C,{AdModule:()=>He,component:()=>Ze});var g=c(177),h=c(467),v=c(9379),e=c(3953),A=c(1210),a=c(9692),x=c(8251),D=c(7031),E=c(6843),G=c(1184),P=c(610),$=c(1803);const U={adId:null};var S=c(2932),V=c(8890),W=c(2596),F=c(7370),O=c(3331),w=c(345),R=c(3178),Q=c(8482),L=c(5964),T=c(6697),j=c(4412),K=c(4572),H=c(7673),y=c(8179),k=c(6078),Z=c(4748),J=c(8582),q=c(953),ee=c(8340),te=c(7816);class b extends te.Q{getAdConfig(){var o;return null===(o=this.data)||void 0===o?void 0:o.configuration}}class I extends ee.U{}class ne extends b{constructor(o){super("Audienzz Ads",o),this.data=o}createInstance(){return new ie(this)}canRunWithoutConsent(){return!0}isValidConfiguration(){const o=this.getAdConfig();return!!(null!=o&&o.adTagId&&null!=o&&o.headerScriptId&&null!=o&&o.headerScriptUrl)}}class ie extends I{constructor(o){super(o),this.config=o}adjustDocument(){var o=this;return(0,h.A)(function*(){return new Promise((i,t)=>{document.head.appendChild(o.createScript(i,t))})})()}showAd(o,i,t,r){const l=this.createAdElement(i.providerConfig);t.parentNode.appendChild(l),r&&r()}removeAd(o){const i=document.getElementById("".concat(o));i&&i.remove()}createAdElement(o){const i=document.createElement("div");return i.id="".concat(o.id),i}createScript(o,i){const t=this.getConfig().getAdConfig(),r=document.createElement("script");return r.id=t.headerScriptId,r.src="".concat(t.headerScriptUrl,"?adTagId=").concat(t.adTagId),r.setAttribute("defer","defer"),r.onload=()=>{console.debug("[".concat(this.getDisplayName(),"] Script loaded successfully")),o()},r.onerror=s=>{console.error("[".concat(this.getDisplayName(),"] Failed to load script:"),s),i(s)},r}}class oe extends b{constructor(){super("NoopAdService",{})}createInstance(){return new X}isValidConfiguration(){return!0}}class X extends I{constructor(){super(new oe)}adjustDocument(){return Promise.resolve()}showAd(){}removeAd(){}}var re=c(7879),ae=c(2305);const se=["platform"];class ce extends b{constructor(o){super("Adspirit Ads",o),this.data=o}createInstance(){return new de(this)}canRunWithoutConsent(){return!0}isValidConfiguration(){const o=this.getAdConfig();return!(null==o||!o.headerScriptId||null==o||!o.headerScriptUrl)}}class de extends I{constructor(o){super(o),this.config=o,this.setWindowKeys()}setWindowKeys(){const{scriptWinKey:o,premiumSubWinKey:i}=this.getConfig().getAdConfig();this.scriptWindowKey=o,this.premiumSubscriptionKey=i}adjustDocument(){var o=this;return(0,h.A)(function*(){return new Promise((i,t)=>{document.head.appendChild(o.createScript(i,t))})})()}showAd(o,i,t,r){var s=this;return(0,h.A)(function*(){var l;const d=i.providerConfig,{platform:f}=d,p=(0,ae.A)(d,se);let m=(null==p?void 0:p.params)||"";if(m.includes("special=no_ad")||s.getPurchasedSubscription())return;m&&!m.startsWith("&")&&(m="&"+m);const u=s.createAdElement(p,m),_=t.parentNode;_.classList.add("ad",...null!==(l=null==f?void 0:f.split(" "))&&void 0!==l?l:[]),_.appendChild(u),s.refreshSlot(p.id),r&&r()})()}removeAd(o){const i=document.getElementById("".concat(o));i&&i.remove()}refreshSlot(o){var i=this;return(0,h.A)(function*(){var t;yield i.init$,null===(t=i.scriptMethods)||void 0===t||t.refreshSlot(o)})()}getPurchasedSubscription(){return!!this.premiumSubscriptionKey&&!!window[this.premiumSubscriptionKey]}createAdElement(o,i){const{id:t,width:r,height:s,spaceTop:l,spaceBottom:d}=o,f=document.createElement("div");let p="ad-content";l&&(p+=" space-top-".concat(l)),d&&(p+=" space-bottom-".concat(d)),f.className=p;const m=document.createElement("div");m.className="ad-content-inner";const u=document.createElement("ins");u.className="asm_async_creative",u.style.display="inline-block",u.style.width=r?"".concat(r,"px"):"100%",u.style.height=s?"".concat(s,"px"):"auto",u.style.textAlign="left",u.style.textDecoration="none",u.setAttribute("data-asm-cdn","cdn.adspirit.de"),u.setAttribute("data-asm-host","apoverlag.adspirit.de"),u.setAttribute("data-asm-params","pid=".concat(t).concat(i));const _=document.createElement("span");return _.className="ad-badge",_.textContent="Anzeige",m.appendChild(u),m.appendChild(_),f.appendChild(m),f}createScript(o,i){const t=this.getConfig().getAdConfig(),r=document.createElement("script");return r.id=t.headerScriptId,r.src="".concat(t.headerScriptUrl),r.setAttribute("defer","defer"),r.onload=()=>{console.debug("[".concat(this.getDisplayName(),"] Script loaded successfully")),globalThis[this.scriptWindowKey]&&(this.scriptMethods=globalThis[this.scriptWindowKey]),o()},r.onerror=s=>{console.error("[".concat(this.getDisplayName(),"] Failed to load script:"),s),i(s)},r}}let le=(()=>{var n;class o{constructor(){this.platformId=(0,e.WQX)(e.Agw),this.pxpConfig=(0,e.WQX)(re.Wp),this.pluginService=(0,e.WQX)(q.z),this.consentService=(0,e.WQX)(k.e),this.activePlugin=new X,this.initPromise=this.initializeAdPlugin()}showAd(t,r,s,l){var d=this;return(0,h.A)(function*(){yield d.initPromise;try{d.activePlugin.showAd(t,r,s,l)}catch(f){console.error("Failed to show plugin ad: ".concat(f))}})()}removeAd(t){var r=this;return(0,h.A)(function*(){yield r.initPromise;try{r.activePlugin.removeAd(t)}catch(s){console.error("Failed to remove plugin ad: ".concat(s))}})()}initializeAdPlugin(){var t=this;return(0,h.A)(function*(){var r;if(!(0,g.UE)(t.platformId))return;yield t.pluginService.init$,yield t.consentService.init$;const s=t.pxpConfig,l=null==s||null===(r=s.purple)||void 0===r?void 0:r.ads;let d;null!=l&&l.audienzz&&(d=t.loadPlugin(l.audienzz,ne)),null!=l&&l.adspirit&&(d=t.loadPlugin(l.adspirit,ce)),d&&(t.activePlugin=d)})()}loadPlugin(t,r){return this.pluginConfig=new r(t),this.consentService.canRunPlugin(this.pluginConfig)&&this.pluginService.loadPlugin(this.pluginConfig)}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"}),o})();var M=c(1302),fe=c(3726),ge=c(152);let z=(()=>{var n;class o{constructor(){this.el=(0,e.WQX)(e.aKT),this.ngZone=(0,e.WQX)(e.SKi),this.platformId=(0,e.WQX)(e.Agw),this.pixelsLeftToScroll=600,this.elementVisible=new e.bkB,this.isVisible=!1}ngAfterViewInit(){(0,g.UE)(this.platformId)&&this.ngZone.runOutsideAngular(()=>{this.scrollSubscription=(0,fe.R)(window,"scroll",{passive:!0}).pipe((0,ge.B)(100)).subscribe(()=>this.checkPosition()),setTimeout(()=>this.checkPosition(),500)})}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe()}checkPosition(){if(!this.isVisible){const t=this.el.nativeElement.getBoundingClientRect(),r=window.innerHeight;t.top<=r+this.pixelsLeftToScroll&&this.ngZone.run(()=>{this.isVisible=!0,this.elementVisible.emit(!0)})}}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275dir=e.FsC({type:n,selectors:[["","storefrontVisibleOnScroll",""]],inputs:{pixelsLeftToScroll:"pixelsLeftToScroll"},outputs:{elementVisible:"elementVisible"},standalone:!1}),o})(),N=(()=>{var n;class o{constructor(){this.sanitizer=(0,e.WQX)(w.up)}transform(t,r="url"){switch(r){case"html":return this.sanitizer.bypassSecurityTrustHtml(t);case"style":return this.sanitizer.bypassSecurityTrustStyle(t);case"script":return this.sanitizer.bypassSecurityTrustScript(t);case"url":return this.sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error("Invalid safe type specified: ".concat(r))}}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275pipe=e.EJ8({name:"sanitizeUrl",type:n,pure:!0,standalone:!1}),o})();const pe=["stickyLink"],ue=["adContainer"];function me(n,o){if(1&n&&(e.qex(0),e.nrm(1,"div",6),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("id",i.uuid)}}function he(n,o){if(1&n&&e.nrm(0,"iframe",8),2&n){const i=e.XpG(3);e.Y8G("src",i.safeIframeUrl,e.f$h)}}function ve(n,o){if(1&n&&(e.qex(0),e.DNE(1,he,1,1,"iframe",7),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.safeIframeUrl)}}function _e(n,o){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"div",9),e.bIt("elementVisible",function(r){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onVisible(r))}),e.k0s(),e.bVm()}if(2&n){const i=e.XpG(2).ngIf;e.R7$(),e.HbH(i.class),e.Y8G("id",i.id)}}function Ce(n,o){if(1&n&&(e.qex(0),e.DNE(1,_e,2,3,"ng-container",2),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",!i.isDynamicAd)}}function Ae(n,o){1&n&&e.eu8(0)}function ye(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function xe(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Se(n,o){if(1&n&&e.DNE(0,ye,1,2,"div",13)(1,xe,1,2,"storefront-image",14),2&n){const i=e.XpG(4);e.vxM(i.domHelper.leanDom?0:1)}}function be(n,o){if(1&n&&(e.j41(0,"a",12),e.nI1(1,"sanitizeUrl"),e.DNE(2,Se,2,1),e.k0s()),2&n){const i=e.XpG(3);e.Y8G("href",e.bMT(1,3,i.getHref()),e.B4B)("target",i.target),e.R7$(2),e.vxM(i.getImageSrc()?2:-1)}}function Ie(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function De(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Ee(n,o){if(1&n&&e.DNE(0,Ie,1,2,"div",13)(1,De,1,2,"storefront-image",14),2&n){const i=e.XpG(3);e.vxM(i.domHelper.leanDom?0:1)}}function Ge(n,o){if(1&n&&(e.qex(0),e.DNE(1,be,3,5,"a",10),e.j41(2,"a",11,1),e.nI1(4,"sanitizeUrl"),e.DNE(5,Ee,2,1),e.k0s(),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.ad),e.R7$(),e.Y8G("href",e.bMT(4,4,i.getHref()),e.B4B)("target",i.target),e.R7$(3),e.vxM(i.getImageSrc()?5:-1)}}function Pe(n,o){if(1&n&&(e.qex(0,null,0)(2,3),e.DNE(3,me,2,1,"ng-container",4)(4,ve,2,1,"ng-container",4)(5,Ce,2,1,"ng-container",4)(6,Ae,1,0,"ng-container",4)(7,Ge,6,6,"ng-container",5),e.bVm()()),2&n){const i=o.ngIf,t=e.XpG();e.R7$(2),e.Y8G("ngSwitch",i.type),e.R7$(),e.Y8G("ngSwitchCase","GPT"),e.R7$(),e.Y8G("ngSwitchCase","HTML"),e.R7$(),e.Y8G("ngSwitchCase","TRAFFECTIVE"),e.R7$(),e.Y8G("ngSwitchCase",t.isAdServiceType)}}let B=(()=>{var n;class o extends A.${constructor(){super(...arguments),this.store=(0,e.WQX)(x.B),this.googleAdService=(0,e.WQX)(W.s),this.router=(0,e.WQX)(O.Ix),this.sanitizer=(0,e.WQX)(w.up),this.adService=(0,e.WQX)(le),this.traffectiveAdService=(0,e.WQX)(Q.y),this.consentService=(0,e.WQX)(k.e),this.ssrService=(0,e.WQX)(Z.i),this.ngZone=(0,e.WQX)(e.SKi),this.changeDetectorRef=(0,e.WQX)(e.gRc),this.isBrowser=(0,g.UE)(this.platformId),this.load=new e.bkB,this.loaded=!1,this.adVisible$=new j.t(!1),this.defaultConfig=(0,v.A)({},U)}get adType(){var t;return null===(t=this.ad)||void 0===t?void 0:t.providerConfig.type}get regularAdType(){return this.domHelper.regularSelector(this.adType)}get prefixedAdType(){return this.domHelper.prefixedSelector(this.adType)}get iframeHostHeight(){var t;return(null===(t=this.ad)||void 0===t?void 0:t.providerConfig)&&this.ad.providerConfig.height}onClick(t){t.stopPropagation(),this.stickyLink&&(t.target===this.stickyLink.nativeElement||this.stickyLink.nativeElement.contains(t.target))?this.store.dispatch((0,P.k4)({url:window.location.href,key:"AD_STICKY_CLICKED",params:this.getTrackingParams()})):this.store.dispatch((0,P.k4)({url:window.location.href,key:"AD_CLICKED",params:this.getTrackingParams()}));const r=this.getHref();if(r.startsWith("#"))return this.router.navigateByUrl(r.substring(1)),t.preventDefault(),!1}ngOnDestroy(){super.ngOnDestroy(),this.ad&&this.loaded&&this.ad.providerConfig.type===a.P.GPT&&this.googleAdService.removeAd(this.uuid)}rebuildContextKeys(){super.rebuildContextKeys();const t=this.getAdConfig(this.baseConfig);null!=t&&t.providerConfig&&(0,G.Fl)(t.providerConfig,this.contextKeys)}onConfigChanges(){var t=this;return(0,h.A)(function*(){var r;const s=t.getAdConfig(t.config);if(s&&s.providerConfig){if(s.providerConfig){const f=(0,y.uQ)((0,v.A)((0,v.A)({},s.providerConfig),{},{targeting:null}),t.contextService.getContext(),t.contextService.$functions,t.globalService.getGlobalData());if(!(0,y.ZY)(f))return void(t.config=null);t.resolvedProviderConfig=f}var l;if((0,g.UE)(t.platformId)&&s.providerConfig.type==a.P.TRAFFECTIVE&&(yield t.consentService.init$,null===(l=t.traffectiveAdService)||void 0===l||!l.hasConsent()))return;t.ad=s,t.changeDetectorRef.detectChanges(),void 0===t.config.isLazy||t.config.isLazy?t.store.subscribe((0,V.eh)(t,t.elementRef,{skipWait:(0,g.Vy)(t.platformId)}),f=>{t.initAd()},R.lQ,R.lQ,"visible"):t.initAd()}else t.config.adId&&(s?s.providerConfig||console.warn("No provider config found for id ".concat(s.id,". Please migrate the ad configuration")):console.warn("No ad found for id ".concat(t.config.adId)));if("HTML"===(null===(r=t.ad)||void 0===r?void 0:r.providerConfig.type)){var d;const f=null===(d=t.ad)||void 0===d||null===(d=d.providerConfig)||void 0===d?void 0:d.url;f!==t.iframeUrl&&(t.iframeUrl=f,t.safeIframeUrl=t.sanitizer.bypassSecurityTrustResourceUrl(t.contextService.toStorefrontResourceUrl(f)))}t.target=t.getTarget()})()}getAdConfig(t){let r=null;return t&&(t.adId?this.store.select((0,D.jZ)(E.O.AD),s=>{r=s.adSlots.find(l=>l.id===t.adId)}):t.ad&&(r=t.ad)),r}initAd(){var t;if(this.loaded=!0,!this.isBrowser||null!==(t=window.storefrontHooks)&&void 0!==t&&t.isAdDisabled&&window.storefrontHooks.isAdDisabled(this.ad.id))return;const r=this.ad.providerConfig.type;if(this.isAdServiceType(r))this.initPluginAd();else switch(r){case a.P.GPT:this.initGpt();break;case a.P.TRAFFECTIVE:this.initTraffective();break;default:return this.target=this.getTarget(),void this.load.emit()}}initGpt(){var t=this;return(0,h.A)(function*(){const r=(0,v.A)((0,v.A)({},t.resolvedProviderConfig),{},{targeting:t.mergeTargeting(t.ad.providerConfig.targeting)});t.uuid="div-gpt-"+(r.fixedId?t.ad.id:(0,J.l)()),t.changeDetectorRef.detectChanges();let s=null;r.sizeMapping&&t.store.select((0,D.jZ)(E.O.AD),l=>{const d=l.adSlots.find(f=>f.id===r.sizeMapping);d&&d.providerConfig&&"SIZEMAPPING"===d.providerConfig.type&&(s=d.providerConfig)}),t.googleAdService.showAd(t.uuid,r,s,t.elementRef.nativeElement,()=>{t.load.emit(),t.resizeGoogleAd()},()=>t.resizeGoogleAd()),t.store.subscribe((0,V.Ne)(),()=>t.resizeGoogleAd())})()}initTraffective(){var t=this;return(0,h.A)(function*(){if(t.ad.providerConfig){var r;const{id:s,class:l}=t.ad.providerConfig;t.isDynamicAd="Floor"==l||"Mobile_Sticky"==l,(0,K.z)([null===(r=t.traffectiveAdService)||void 0===r?void 0:r.isTRFConfigReady$.pipe((0,L.p)(d=>d),(0,T.s)(1)),t.isDynamicAd?(0,H.of)(!0):t.adVisible$.pipe((0,L.p)(d=>d),(0,T.s)(1))]).subscribe(()=>{var d;if(!(0,g.Vy)(t.platformId)&&null!==(d=window)&&void 0!==d&&d.traffective)try{t.ssrService.prebootCompleted$.subscribe(()=>{t.ngZone.runOutsideAngular(t.isDynamicAd?()=>{window.traffective.refreshBottomSticky(l,s)}:()=>{window.traffective.refreshSlot(l,s)})})}catch(f){console.warn("Error with traffective refresh slot",f)}})}})()}mergeTargeting(t){let r=null;if(t||this.config.targeting){r=[];let s=new Map;this.evaluateTargeting(t,s),this.evaluateTargeting(this.config.targeting,s),s.forEach((l,d)=>{r.push({key:d,value:l})})}return r}evaluateTargeting(t,r){t&&t.forEach(s=>{const l=(0,y.uQ)(s.key,this.contextService.getContext(),this.contextService.$functions,this.globalService.getGlobalData(),!1);if(l&&""!==l){let d=r.get(l);d||(d=[]),(Array.isArray(s.value)?s.value:[s.value]).forEach(f=>{let p=(0,y.uQ)(f,this.contextService.getContext(),this.contextService.$functions,this.globalService.getGlobalData(),!1);if(s.multiValue){let m=p.split(",").filter(u=>""!==u);d.concat(m)}else p&&""!==p&&d.push(p)}),d.length>0&&r.set(l,d)}})}resizeGoogleAd(){}getImageHeight(){return this.config.imageHeight||S.q.AUTO}getImageSrc(t=!1){const r=this.ad&&this.ad.providerConfig;return r&&(0,G.rv)(t&&r.stickyImage||r.image)}getHref(){const t=this.ad&&this.ad.providerConfig;return t&&t.target}getTrackingParams(){return{AD_ID:this.config.adId}}onVisible(t){t&&this.adVisible$.next(!0)}isAdServiceType(t){return"AUDIENZZ"===t||"ADSPIRIT"===t}initPluginAd(){this.adContainer&&this.adService.showAd(null,(0,v.A)((0,v.A)({},this.ad),{},{providerConfig:this.resolvedProviderConfig}),this.adContainer.nativeElement,()=>this.load.emit())}getTarget(){return(0,F.tb)(this.getHref())?$.We.BLANK:$.We.SELF}}return(n=o).type="ad",n.\u0275fac=(()=>{let i;return function(r){return(i||(i=e.xGo(n)))(r||n)}})(),n.\u0275cmp=e.VBU({type:n,selectors:[["storefront-ad"]],viewQuery:function(t,r){if(1&t&&(e.GBs(pe,5,e.aKT),e.GBs(ue,5,e.aKT)),2&t){let s;e.mGM(s=e.lsd())&&(r.stickyLink=s.first),e.mGM(s=e.lsd())&&(r.adContainer=s.first)}},hostVars:4,hostBindings:function(t,r){1&t&&e.bIt("click",function(l){return r.onClick(l)}),2&t&&(e.BMQ("ad-type",r.regularAdType)("data-pxp-ad-type",r.prefixedAdType),e.xc7("height",r.iframeHostHeight))},standalone:!1,features:[e.Jv_([x.B]),e.Vt3],decls:1,vars:1,consts:[["adContainer",""],["stickyLink",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"id"],["title","ad",3,"src",4,"ngIf"],["title","ad",3,"src"],["storefrontVisibleOnScroll","",1,"no-display",3,"elementVisible","id"],[3,"href","target",4,"ngIf"],[1,"ad-sticky",3,"href","target"],[3,"href","target"],[1,"pxp-image",3,"height","src"],[3,"height","src"]],template:function(t,r){1&t&&e.DNE(0,Pe,8,5,"ng-container",2),2&t&&e.Y8G("ngIf",r.ad&&r.ad.providerConfig)},dependencies:[g.bT,g.ux,g.e1,g.fG,S.h,M.x,z,N],styles:["storefront-ad,.pxp-ad{display:block;overflow:hidden}storefront-ad a,.pxp-ad a{display:block}storefront-ad a.ad-sticky,.pxp-ad a.ad-sticky{display:none}storefront-ad storefront-image img.error,storefront-ad .pxp-image img.error,.pxp-ad storefront-image img.error,.pxp-ad .pxp-image img.error{position:relative;width:100vw;height:25vw;background-image:url(/assets/banner/banner_not_found.jpg);background-size:contain;opacity:1}storefront-ad[ad-type=HTML]>iframe,storefront-ad[data-pxp-ad-type=HTML]>iframe,.pxp-ad[ad-type=HTML]>iframe,.pxp-ad[data-pxp-ad-type=HTML]>iframe{width:100%;height:100%}.sticky-elements storefront-ad a,.sticky-elements .pxp-ad a{display:none}.sticky-elements storefront-ad a.ad-sticky,.sticky-elements .pxp-ad a.ad-sticky{display:block}.no-display{display:none}\n"],encapsulation:2}),o})();var $e=c(4403),Ve=c(4871);let we=(()=>{var n;class o{}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[g.MD]}),o})();const Re=["class","pxp-ad"];function Le(n,o){if(1&n&&(e.qex(0),e.nrm(1,"div",6),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("id",i.uuid)}}function Te(n,o){if(1&n&&e.nrm(0,"iframe",8),2&n){const i=e.XpG(3);e.Y8G("src",i.safeIframeUrl,e.f$h)}}function ke(n,o){if(1&n&&(e.qex(0),e.DNE(1,Te,1,1,"iframe",7),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.safeIframeUrl)}}function Xe(n,o){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"div",9),e.bIt("elementVisible",function(r){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onVisible(r))}),e.k0s(),e.bVm()}if(2&n){const i=e.XpG(2).ngIf;e.R7$(),e.HbH(i.class),e.Y8G("id",i.id)}}function Me(n,o){if(1&n&&(e.qex(0),e.DNE(1,Xe,2,3,"ng-container",2),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",!i.isDynamicAd)}}function ze(n,o){1&n&&e.eu8(0)}function Ne(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Be(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Ye(n,o){if(1&n&&e.DNE(0,Ne,1,2,"div",13)(1,Be,1,2,"storefront-image",14),2&n){const i=e.XpG(4);e.vxM(i.domHelper.leanDom?0:1)}}function Ue(n,o){if(1&n&&(e.j41(0,"a",12),e.nI1(1,"sanitizeUrl"),e.DNE(2,Ye,2,1),e.k0s()),2&n){const i=e.XpG(3);e.Y8G("href",e.bMT(1,3,i.getHref()),e.B4B)("target",i.target),e.R7$(2),e.vxM(i.getImageSrc()?2:-1)}}function We(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Fe(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Oe(n,o){if(1&n&&e.DNE(0,We,1,2,"div",13)(1,Fe,1,2,"storefront-image",14),2&n){const i=e.XpG(3);e.vxM(i.domHelper.leanDom?0:1)}}function Qe(n,o){if(1&n&&(e.qex(0),e.DNE(1,Ue,3,5,"a",10),e.j41(2,"a",11,1),e.nI1(4,"sanitizeUrl"),e.DNE(5,Oe,2,1),e.k0s(),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.ad),e.R7$(),e.Y8G("href",e.bMT(4,4,i.getHref()),e.B4B)("target",i.target),e.R7$(3),e.vxM(i.getImageSrc()?5:-1)}}function je(n,o){if(1&n&&(e.qex(0,null,0)(2,3),e.DNE(3,Le,2,1,"ng-container",4)(4,ke,2,1,"ng-container",4)(5,Me,2,1,"ng-container",4)(6,ze,1,0,"ng-container",4)(7,Qe,6,6,"ng-container",5),e.bVm()()),2&n){const i=o.ngIf,t=e.XpG();e.R7$(2),e.Y8G("ngSwitch",i.type),e.R7$(),e.Y8G("ngSwitchCase","GPT"),e.R7$(),e.Y8G("ngSwitchCase","HTML"),e.R7$(),e.Y8G("ngSwitchCase","TRAFFECTIVE"),e.R7$(),e.Y8G("ngSwitchCase",t.isAdServiceType)}}let Ke=(()=>{var n;class o extends B{}return(n=o).\u0275fac=(()=>{let i;return function(r){return(i||(i=e.xGo(n)))(r||n)}})(),n.\u0275cmp=e.VBU({type:n,selectors:[["div",8,"pxp-ad"]],standalone:!1,features:[e.Jv_([x.B]),e.Vt3],attrs:Re,decls:1,vars:1,consts:[["adContainer",""],["stickyLink",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"id"],["title","ad",3,"src",4,"ngIf"],["title","ad",3,"src"],["storefrontVisibleOnScroll","",1,"no-display",3,"elementVisible","id"],[3,"href","target",4,"ngIf"],[1,"ad-sticky",3,"href","target"],[3,"href","target"],[1,"pxp-image",3,"height","src"],[3,"height","src"]],template:function(t,r){1&t&&e.DNE(0,je,8,5,"ng-container",2),2&t&&e.Y8G("ngIf",r.ad&&r.ad.providerConfig)},dependencies:[g.bT,g.ux,g.e1,g.fG,S.h,M.x,z,N],styles:["storefront-ad,.pxp-ad{display:block;overflow:hidden}storefront-ad a,.pxp-ad a{display:block}storefront-ad a.ad-sticky,.pxp-ad a.ad-sticky{display:none}storefront-ad storefront-image img.error,storefront-ad .pxp-image img.error,.pxp-ad storefront-image img.error,.pxp-ad .pxp-image img.error{position:relative;width:100vw;height:25vw;background-image:url(/assets/banner/banner_not_found.jpg);background-size:contain;opacity:1}storefront-ad[ad-type=HTML]>iframe,storefront-ad[data-pxp-ad-type=HTML]>iframe,.pxp-ad[ad-type=HTML]>iframe,.pxp-ad[data-pxp-ad-type=HTML]>iframe{width:100%;height:100%}.sticky-elements storefront-ad a,.sticky-elements .pxp-ad a{display:none}.sticky-elements storefront-ad a.ad-sticky,.sticky-elements .pxp-ad a.ad-sticky{display:block}.no-display{display:none}\n"],encapsulation:2}),o})(),He=(()=>{var n;class o{}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[g.MD,$e.U,Ve.E,we]}),o})();const Ze={component:B,leanDomComponent:Ke}},1803:(Y,C,c)=>{c.d(C,{OE:()=>A,OK:()=>e,TS:()=>g,We:()=>v});var g=function(a){return a.VERTICAL="vertical",a.HORIZONTAL="horizontal",a.GRID="grid",a.GROUP="group",a.TABS="tabs",a}(g||{}),v=function(a){return a.BLANK="_blank",a.SELF="_self",a}(v||{}),e=function(a){return a.div="div",a.a="a",a.br="br",a.button="button",a.dialog="dialog",a.em="em",a.h1="h1",a.h2="h2",a.h3="h3",a.h4="h4",a.h5="h5",a.h6="h6",a.hr="hr",a.iframe="iframe",a.img="img",a.input="input",a.li="li",a.ol="ol",a.p="p",a.pre="pre",a.small="small",a.span="span",a.ul="ul",a.article="article",a.aside="aside",a.details="details",a.figcaption="figcaption",a.figure="figure",a.footer="footer",a.header="header",a.main="main",a.mark="mark",a.nav="nav",a.section="section",a.summary="summary",a.time="time",a}(e||{}),A=function(a){return a.div="div",a.a="a",a.button="button",a.dialog="dialog",a.h1="h1",a.h2="h2",a.h3="h3",a.h4="h4",a.h5="h5",a.h6="h6",a.li="li",a.ol="ol",a.p="p",a.span="span",a.ul="ul",a.article="article",a.aside="aside",a.details="details",a.figcaption="figcaption",a.figure="figure",a.footer="footer",a.header="header",a.main="main",a.mark="mark",a.nav="nav",a.section="section",a.summary="summary",a.time="time",a}(A||{})}}]);
1
+ "use strict";(self.webpackChunkstorefront=self.webpackChunkstorefront||[]).push([["projects_storefront_src_app_component_ad_ad_module_ts"],{3394:(Y,C,c)=>{c.r(C),c.d(C,{AdModule:()=>He,component:()=>Ze});var g=c(177),h=c(467),v=c(9379),e=c(3953),A=c(1210),a=c(9692),x=c(8251),D=c(7031),E=c(6843),G=c(1184),P=c(610),$=c(1803);const U={adId:null};var S=c(2932),V=c(8890),W=c(2596),F=c(7370),O=c(3331),w=c(345),R=c(3178),Q=c(8482),L=c(5964),T=c(6697),j=c(4412),K=c(4572),H=c(7673),y=c(8179),X=c(6078),Z=c(4748),J=c(8582),q=c(953),ee=c(8340),te=c(7816);class b extends te.Q{getAdConfig(){var o;return null===(o=this.data)||void 0===o?void 0:o.configuration}}class I extends ee.U{}class ne extends b{constructor(o){super("Audienzz Ads",o),this.data=o}createInstance(){return new ie(this)}canRunWithoutConsent(){return!0}isValidConfiguration(){const o=this.getAdConfig();return!!(null!=o&&o.adTagId&&null!=o&&o.headerScriptId&&null!=o&&o.headerScriptUrl)}}class ie extends I{constructor(o){super(o),this.config=o}adjustDocument(){var o=this;return(0,h.A)(function*(){return new Promise((i,t)=>{document.head.appendChild(o.createScript(i,t))})})()}showAd(o,i,t,r){const l=this.createAdElement(i.providerConfig);t.parentNode.appendChild(l),r&&r()}removeAd(o){const i=document.getElementById("".concat(o));i&&i.remove()}createAdElement(o){const i=document.createElement("div");return i.id="".concat(o.id),i}createScript(o,i){const t=this.getConfig().getAdConfig(),r=document.createElement("script");return r.id=t.headerScriptId,r.src="".concat(t.headerScriptUrl,"?adTagId=").concat(t.adTagId),r.setAttribute("defer","defer"),r.onload=()=>{console.debug("[".concat(this.getDisplayName(),"] Script loaded successfully")),o()},r.onerror=s=>{console.error("[".concat(this.getDisplayName(),"] Failed to load script:"),s),i(s)},r}}class oe extends b{constructor(){super("NoopAdService",{})}createInstance(){return new k}isValidConfiguration(){return!0}}class k extends I{constructor(){super(new oe)}adjustDocument(){return Promise.resolve()}showAd(){}removeAd(){}}var re=c(7879),ae=c(2305);const se=["platform"];class ce extends b{constructor(o){super("Adspirit Ads",o),this.data=o}createInstance(){return new de(this)}canRunWithoutConsent(){return!0}isValidConfiguration(){const o=this.getAdConfig();return!(null==o||!o.headerScriptId||null==o||!o.headerScriptUrl)}}class de extends I{constructor(o){super(o),this.config=o,this.setWindowKeys()}setWindowKeys(){const{scriptWinKey:o,premiumSubWinKey:i}=this.getConfig().getAdConfig();this.scriptWindowKey=o,this.premiumSubscriptionKey=i}adjustDocument(){var o=this;return(0,h.A)(function*(){return new Promise((i,t)=>{document.head.appendChild(o.createScript(i,t))})})()}showAd(o,i,t,r){var s=this;return(0,h.A)(function*(){var l;const d=i.providerConfig,{platform:f}=d,p=(0,ae.A)(d,se);let m=(null==p?void 0:p.params)||"";if(m.includes("special=no_ad")||s.getPurchasedSubscription())return;m&&!m.startsWith("&")&&(m="&"+m);const u=s.createAdElement(p,m),_=t.parentNode;_.classList.add("ad",...null!==(l=null==f?void 0:f.split(" "))&&void 0!==l?l:[]),_.appendChild(u),s.refreshSlot(p.id),r&&r()})()}removeAd(o){const i=document.getElementById("".concat(o));i&&i.remove()}refreshSlot(o){var i=this;return(0,h.A)(function*(){var t;yield i.init$,null===(t=i.scriptMethods)||void 0===t||t.refreshSlot(o)})()}getPurchasedSubscription(){return!!this.premiumSubscriptionKey&&!!window[this.premiumSubscriptionKey]}createAdElement(o,i){const{id:t,width:r,height:s,spaceTop:l,spaceBottom:d}=o,f=document.createElement("div");let p="ad-content";l&&(p+=" space-top-".concat(l)),d&&(p+=" space-bottom-".concat(d)),f.className=p;const m=document.createElement("div");m.className="ad-content-inner";const u=document.createElement("ins");u.className="asm_async_creative",u.style.display="inline-block",u.style.width=r?"".concat(r,"px"):"100%",u.style.height=s?"".concat(s,"px"):"auto",u.style.textAlign="left",u.style.textDecoration="none",u.setAttribute("data-asm-cdn","cdn.adspirit.de"),u.setAttribute("data-asm-host","apoverlag.adspirit.de"),u.setAttribute("data-asm-params","pid=".concat(t).concat(i));const _=document.createElement("span");return _.className="ad-badge",_.textContent="Anzeige",m.appendChild(u),m.appendChild(_),f.appendChild(m),f}createScript(o,i){const t=this.getConfig().getAdConfig(),r=document.createElement("script");return r.id=t.headerScriptId,r.src="".concat(t.headerScriptUrl),r.setAttribute("defer","defer"),r.onload=()=>{console.debug("[".concat(this.getDisplayName(),"] Script loaded successfully")),globalThis[this.scriptWindowKey]&&(this.scriptMethods=globalThis[this.scriptWindowKey]),o()},r.onerror=s=>{console.error("[".concat(this.getDisplayName(),"] Failed to load script:"),s),i(s)},r}}let le=(()=>{var n;class o{constructor(){this.platformId=(0,e.WQX)(e.Agw),this.pxpConfig=(0,e.WQX)(re.Wp),this.pluginService=(0,e.WQX)(q.z),this.consentService=(0,e.WQX)(X.e),this.activePlugin=new k,this.initPromise=this.initializeAdPlugin()}showAd(t,r,s,l){var d=this;return(0,h.A)(function*(){yield d.initPromise;try{d.activePlugin.showAd(t,r,s,l)}catch(f){console.error("Failed to show plugin ad: ".concat(f))}})()}removeAd(t){var r=this;return(0,h.A)(function*(){yield r.initPromise;try{r.activePlugin.removeAd(t)}catch(s){console.error("Failed to remove plugin ad: ".concat(s))}})()}initializeAdPlugin(){var t=this;return(0,h.A)(function*(){var r;if(!(0,g.UE)(t.platformId))return;yield t.pluginService.init$,yield t.consentService.init$;const s=t.pxpConfig,l=null==s||null===(r=s.purple)||void 0===r?void 0:r.ads;let d;null!=l&&l.audienzz&&(d=t.loadPlugin(l.audienzz,ne)),null!=l&&l.adspirit&&(d=t.loadPlugin(l.adspirit,ce)),d&&(t.activePlugin=d)})()}loadPlugin(t,r){return this.pluginConfig=new r(t),this.consentService.canRunPlugin(this.pluginConfig)&&this.pluginService.loadPlugin(this.pluginConfig)}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275prov=e.jDH({token:n,factory:n.\u0275fac,providedIn:"root"}),o})();var M=c(1302),fe=c(3726),ge=c(152);let z=(()=>{var n;class o{constructor(){this.el=(0,e.WQX)(e.aKT),this.ngZone=(0,e.WQX)(e.SKi),this.platformId=(0,e.WQX)(e.Agw),this.pixelsLeftToScroll=600,this.elementVisible=(0,e.CGW)(),this.isVisible=!1}ngAfterViewInit(){(0,g.UE)(this.platformId)&&this.ngZone.runOutsideAngular(()=>{this.scrollSubscription=(0,fe.R)(window,"scroll",{passive:!0}).pipe((0,ge.B)(100)).subscribe(()=>this.checkPosition()),setTimeout(()=>this.checkPosition(),500)})}ngOnDestroy(){this.scrollSubscription&&this.scrollSubscription.unsubscribe()}checkPosition(){if(!this.isVisible){const t=this.el.nativeElement.getBoundingClientRect(),r=window.innerHeight;t.top<=r+this.pixelsLeftToScroll&&this.ngZone.run(()=>{this.isVisible=!0,this.elementVisible.emit(!0)})}}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275dir=e.FsC({type:n,selectors:[["","storefrontVisibleOnScroll",""]],inputs:{pixelsLeftToScroll:"pixelsLeftToScroll"},outputs:{elementVisible:"elementVisible"},standalone:!1}),o})(),N=(()=>{var n;class o{constructor(){this.sanitizer=(0,e.WQX)(w.up)}transform(t,r="url"){switch(r){case"html":return this.sanitizer.bypassSecurityTrustHtml(t);case"style":return this.sanitizer.bypassSecurityTrustStyle(t);case"script":return this.sanitizer.bypassSecurityTrustScript(t);case"url":return this.sanitizer.bypassSecurityTrustUrl(t);case"resourceUrl":return this.sanitizer.bypassSecurityTrustResourceUrl(t);default:throw new Error("Invalid safe type specified: ".concat(r))}}}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275pipe=e.EJ8({name:"sanitizeUrl",type:n,pure:!0,standalone:!1}),o})();const pe=["stickyLink"],ue=["adContainer"];function me(n,o){if(1&n&&(e.qex(0),e.nrm(1,"div",6),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("id",i.uuid)}}function he(n,o){if(1&n&&e.nrm(0,"iframe",8),2&n){const i=e.XpG(3);e.Y8G("src",i.safeIframeUrl,e.f$h)}}function ve(n,o){if(1&n&&(e.qex(0),e.DNE(1,he,1,1,"iframe",7),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.safeIframeUrl)}}function _e(n,o){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"div",9),e.bIt("elementVisible",function(r){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onVisible(r))}),e.k0s(),e.bVm()}if(2&n){const i=e.XpG(2).ngIf;e.R7$(),e.HbH(i.class),e.Y8G("id",i.id)}}function Ce(n,o){if(1&n&&(e.qex(0),e.DNE(1,_e,2,3,"ng-container",2),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",!i.isDynamicAd)}}function Ae(n,o){1&n&&e.eu8(0)}function ye(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function xe(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Se(n,o){if(1&n&&e.DNE(0,ye,1,2,"div",13)(1,xe,1,2,"storefront-image",14),2&n){const i=e.XpG(4);e.vxM(i.domHelper.leanDom?0:1)}}function be(n,o){if(1&n&&(e.j41(0,"a",12),e.nI1(1,"sanitizeUrl"),e.DNE(2,Se,2,1),e.k0s()),2&n){const i=e.XpG(3);e.Y8G("href",e.bMT(1,3,i.getHref()),e.B4B)("target",i.target),e.R7$(2),e.vxM(i.getImageSrc()?2:-1)}}function Ie(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function De(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Ee(n,o){if(1&n&&e.DNE(0,Ie,1,2,"div",13)(1,De,1,2,"storefront-image",14),2&n){const i=e.XpG(3);e.vxM(i.domHelper.leanDom?0:1)}}function Ge(n,o){if(1&n&&(e.qex(0),e.DNE(1,be,3,5,"a",10),e.j41(2,"a",11,1),e.nI1(4,"sanitizeUrl"),e.DNE(5,Ee,2,1),e.k0s(),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.ad),e.R7$(),e.Y8G("href",e.bMT(4,4,i.getHref()),e.B4B)("target",i.target),e.R7$(3),e.vxM(i.getImageSrc()?5:-1)}}function Pe(n,o){if(1&n&&(e.qex(0,null,0)(2,3),e.DNE(3,me,2,1,"ng-container",4)(4,ve,2,1,"ng-container",4)(5,Ce,2,1,"ng-container",4)(6,Ae,1,0,"ng-container",4)(7,Ge,6,6,"ng-container",5),e.bVm()()),2&n){const i=o.ngIf,t=e.XpG();e.R7$(2),e.Y8G("ngSwitch",i.type),e.R7$(),e.Y8G("ngSwitchCase","GPT"),e.R7$(),e.Y8G("ngSwitchCase","HTML"),e.R7$(),e.Y8G("ngSwitchCase","TRAFFECTIVE"),e.R7$(),e.Y8G("ngSwitchCase",t.isAdServiceType)}}let B=(()=>{var n;class o extends A.${constructor(){super(...arguments),this.store=(0,e.WQX)(x.B),this.googleAdService=(0,e.WQX)(W.s),this.router=(0,e.WQX)(O.Ix),this.sanitizer=(0,e.WQX)(w.up),this.adService=(0,e.WQX)(le),this.traffectiveAdService=(0,e.WQX)(Q.y),this.consentService=(0,e.WQX)(X.e),this.ssrService=(0,e.WQX)(Z.i),this.ngZone=(0,e.WQX)(e.SKi),this.changeDetectorRef=(0,e.WQX)(e.gRc),this.isBrowser=(0,g.UE)(this.platformId),this.load=new e.bkB,this.loaded=!1,this.adVisible$=new j.t(!1),this.defaultConfig=(0,v.A)({},U)}get adType(){var t;return null===(t=this.ad)||void 0===t?void 0:t.providerConfig.type}get regularAdType(){return this.domHelper.regularSelector(this.adType)}get prefixedAdType(){return this.domHelper.prefixedSelector(this.adType)}get iframeHostHeight(){var t;return(null===(t=this.ad)||void 0===t?void 0:t.providerConfig)&&this.ad.providerConfig.height}onClick(t){t.stopPropagation(),this.stickyLink&&(t.target===this.stickyLink.nativeElement||this.stickyLink.nativeElement.contains(t.target))?this.store.dispatch((0,P.k4)({url:window.location.href,key:"AD_STICKY_CLICKED",params:this.getTrackingParams()})):this.store.dispatch((0,P.k4)({url:window.location.href,key:"AD_CLICKED",params:this.getTrackingParams()}));const r=this.getHref();if(r.startsWith("#"))return this.router.navigateByUrl(r.substring(1)),t.preventDefault(),!1}ngOnDestroy(){super.ngOnDestroy(),this.ad&&this.loaded&&this.ad.providerConfig.type===a.P.GPT&&this.googleAdService.removeAd(this.uuid)}rebuildContextKeys(){super.rebuildContextKeys();const t=this.getAdConfig(this.baseConfig);null!=t&&t.providerConfig&&(0,G.Fl)(t.providerConfig,this.contextKeys)}onConfigChanges(){var t=this;return(0,h.A)(function*(){var r;const s=t.getAdConfig(t.config);if(s&&s.providerConfig){if(s.providerConfig){const f=(0,y.uQ)((0,v.A)((0,v.A)({},s.providerConfig),{},{targeting:null}),t.contextService.getContext(),t.contextService.$functions,t.globalService.getGlobalData());if(!(0,y.ZY)(f))return void(t.config=null);t.resolvedProviderConfig=f}var l;if((0,g.UE)(t.platformId)&&s.providerConfig.type==a.P.TRAFFECTIVE&&(yield t.consentService.init$,null===(l=t.traffectiveAdService)||void 0===l||!l.hasConsent()))return;t.ad=s,t.changeDetectorRef.detectChanges(),void 0===t.config.isLazy||t.config.isLazy?t.store.subscribe((0,V.eh)(t,t.elementRef,{skipWait:(0,g.Vy)(t.platformId)}),f=>{t.initAd()},R.lQ,R.lQ,"visible"):t.initAd()}else t.config.adId&&(s?s.providerConfig||console.warn("No provider config found for id ".concat(s.id,". Please migrate the ad configuration")):console.warn("No ad found for id ".concat(t.config.adId)));if("HTML"===(null===(r=t.ad)||void 0===r?void 0:r.providerConfig.type)){var d;const f=null===(d=t.ad)||void 0===d||null===(d=d.providerConfig)||void 0===d?void 0:d.url;f!==t.iframeUrl&&(t.iframeUrl=f,t.safeIframeUrl=t.sanitizer.bypassSecurityTrustResourceUrl(t.contextService.toStorefrontResourceUrl(f)))}t.target=t.getTarget()})()}getAdConfig(t){let r=null;return t&&(t.adId?this.store.select((0,D.jZ)(E.O.AD),s=>{r=s.adSlots.find(l=>l.id===t.adId)}):t.ad&&(r=t.ad)),r}initAd(){var t;if(this.loaded=!0,!this.isBrowser||null!==(t=window.storefrontHooks)&&void 0!==t&&t.isAdDisabled&&window.storefrontHooks.isAdDisabled(this.ad.id))return;const r=this.ad.providerConfig.type;if(this.isAdServiceType(r))this.initPluginAd();else switch(r){case a.P.GPT:this.initGpt();break;case a.P.TRAFFECTIVE:this.initTraffective();break;default:return this.target=this.getTarget(),void this.load.emit()}}initGpt(){var t=this;return(0,h.A)(function*(){const r=(0,v.A)((0,v.A)({},t.resolvedProviderConfig),{},{targeting:t.mergeTargeting(t.ad.providerConfig.targeting)});t.uuid="div-gpt-"+(r.fixedId?t.ad.id:(0,J.l)()),t.changeDetectorRef.detectChanges();let s=null;r.sizeMapping&&t.store.select((0,D.jZ)(E.O.AD),l=>{const d=l.adSlots.find(f=>f.id===r.sizeMapping);d&&d.providerConfig&&"SIZEMAPPING"===d.providerConfig.type&&(s=d.providerConfig)}),t.googleAdService.showAd(t.uuid,r,s,t.elementRef.nativeElement,()=>{t.load.emit(),t.resizeGoogleAd()},()=>t.resizeGoogleAd()),t.store.subscribe((0,V.Ne)(),()=>t.resizeGoogleAd())})()}initTraffective(){var t=this;return(0,h.A)(function*(){if(t.ad.providerConfig){var r;const{id:s,class:l}=t.ad.providerConfig;t.isDynamicAd="Floor"==l||"Mobile_Sticky"==l,(0,K.z)([null===(r=t.traffectiveAdService)||void 0===r?void 0:r.isTRFConfigReady$.pipe((0,L.p)(d=>d),(0,T.s)(1)),t.isDynamicAd?(0,H.of)(!0):t.adVisible$.pipe((0,L.p)(d=>d),(0,T.s)(1))]).subscribe(()=>{var d;if(!(0,g.Vy)(t.platformId)&&null!==(d=window)&&void 0!==d&&d.traffective)try{t.ssrService.prebootCompleted$.subscribe(()=>{t.ngZone.runOutsideAngular(t.isDynamicAd?()=>{window.traffective.refreshBottomSticky(l,s)}:()=>{window.traffective.refreshSlot(l,s)})})}catch(f){console.warn("Error with traffective refresh slot",f)}})}})()}mergeTargeting(t){let r=null;if(t||this.config.targeting){r=[];let s=new Map;this.evaluateTargeting(t,s),this.evaluateTargeting(this.config.targeting,s),s.forEach((l,d)=>{r.push({key:d,value:l})})}return r}evaluateTargeting(t,r){t&&t.forEach(s=>{const l=(0,y.uQ)(s.key,this.contextService.getContext(),this.contextService.$functions,this.globalService.getGlobalData(),!1);if(l&&""!==l){let d=r.get(l);d||(d=[]),(Array.isArray(s.value)?s.value:[s.value]).forEach(f=>{let p=(0,y.uQ)(f,this.contextService.getContext(),this.contextService.$functions,this.globalService.getGlobalData(),!1);if(s.multiValue){let m=p.split(",").filter(u=>""!==u);d.concat(m)}else p&&""!==p&&d.push(p)}),d.length>0&&r.set(l,d)}})}resizeGoogleAd(){}getImageHeight(){return this.config.imageHeight||S.q.AUTO}getImageSrc(t=!1){const r=this.ad&&this.ad.providerConfig;return r&&(0,G.rv)(t&&r.stickyImage||r.image)}getHref(){const t=this.ad&&this.ad.providerConfig;return t&&t.target}getTrackingParams(){return{AD_ID:this.config.adId}}onVisible(t){t&&this.adVisible$.next(!0)}isAdServiceType(t){return"AUDIENZZ"===t||"ADSPIRIT"===t}initPluginAd(){this.adContainer&&this.adService.showAd(null,(0,v.A)((0,v.A)({},this.ad),{},{providerConfig:this.resolvedProviderConfig}),this.adContainer.nativeElement,()=>this.load.emit())}getTarget(){return(0,F.tb)(this.getHref())?$.We.BLANK:$.We.SELF}}return(n=o).type="ad",n.\u0275fac=(()=>{let i;return function(r){return(i||(i=e.xGo(n)))(r||n)}})(),n.\u0275cmp=e.VBU({type:n,selectors:[["storefront-ad"]],viewQuery:function(t,r){if(1&t&&(e.GBs(pe,5,e.aKT),e.GBs(ue,5,e.aKT)),2&t){let s;e.mGM(s=e.lsd())&&(r.stickyLink=s.first),e.mGM(s=e.lsd())&&(r.adContainer=s.first)}},hostVars:4,hostBindings:function(t,r){1&t&&e.bIt("click",function(l){return r.onClick(l)}),2&t&&(e.BMQ("ad-type",r.regularAdType)("data-pxp-ad-type",r.prefixedAdType),e.xc7("height",r.iframeHostHeight))},standalone:!1,features:[e.Jv_([x.B]),e.Vt3],decls:1,vars:1,consts:[["adContainer",""],["stickyLink",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"id"],["title","ad",3,"src",4,"ngIf"],["title","ad",3,"src"],["storefrontVisibleOnScroll","",1,"no-display",3,"elementVisible","id"],[3,"href","target",4,"ngIf"],[1,"ad-sticky",3,"href","target"],[3,"href","target"],[1,"pxp-image",3,"height","src"],[3,"height","src"]],template:function(t,r){1&t&&e.DNE(0,Pe,8,5,"ng-container",2),2&t&&e.Y8G("ngIf",r.ad&&r.ad.providerConfig)},dependencies:[g.bT,g.ux,g.e1,g.fG,S.h,M.x,z,N],styles:["storefront-ad,.pxp-ad{display:block;overflow:hidden}storefront-ad a,.pxp-ad a{display:block}storefront-ad a.ad-sticky,.pxp-ad a.ad-sticky{display:none}storefront-ad storefront-image img.error,storefront-ad .pxp-image img.error,.pxp-ad storefront-image img.error,.pxp-ad .pxp-image img.error{position:relative;width:100vw;height:25vw;background-image:url(/assets/banner/banner_not_found.jpg);background-size:contain;opacity:1}storefront-ad[ad-type=HTML]>iframe,storefront-ad[data-pxp-ad-type=HTML]>iframe,.pxp-ad[ad-type=HTML]>iframe,.pxp-ad[data-pxp-ad-type=HTML]>iframe{width:100%;height:100%}.sticky-elements storefront-ad a,.sticky-elements .pxp-ad a{display:none}.sticky-elements storefront-ad a.ad-sticky,.sticky-elements .pxp-ad a.ad-sticky{display:block}.no-display{display:none}\n"],encapsulation:2}),o})();var $e=c(4403),Ve=c(4871);let we=(()=>{var n;class o{}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[g.MD]}),o})();const Re=["class","pxp-ad"];function Le(n,o){if(1&n&&(e.qex(0),e.nrm(1,"div",6),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("id",i.uuid)}}function Te(n,o){if(1&n&&e.nrm(0,"iframe",8),2&n){const i=e.XpG(3);e.Y8G("src",i.safeIframeUrl,e.f$h)}}function Xe(n,o){if(1&n&&(e.qex(0),e.DNE(1,Te,1,1,"iframe",7),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.safeIframeUrl)}}function ke(n,o){if(1&n){const i=e.RV6();e.qex(0),e.j41(1,"div",9),e.bIt("elementVisible",function(r){e.eBV(i);const s=e.XpG(3);return e.Njj(s.onVisible(r))}),e.k0s(),e.bVm()}if(2&n){const i=e.XpG(2).ngIf;e.R7$(),e.HbH(i.class),e.Y8G("id",i.id)}}function Me(n,o){if(1&n&&(e.qex(0),e.DNE(1,ke,2,3,"ng-container",2),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",!i.isDynamicAd)}}function ze(n,o){1&n&&e.eu8(0)}function Ne(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Be(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(5);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Ye(n,o){if(1&n&&e.DNE(0,Ne,1,2,"div",13)(1,Be,1,2,"storefront-image",14),2&n){const i=e.XpG(4);e.vxM(i.domHelper.leanDom?0:1)}}function Ue(n,o){if(1&n&&(e.j41(0,"a",12),e.nI1(1,"sanitizeUrl"),e.DNE(2,Ye,2,1),e.k0s()),2&n){const i=e.XpG(3);e.Y8G("href",e.bMT(1,3,i.getHref()),e.B4B)("target",i.target),e.R7$(2),e.vxM(i.getImageSrc()?2:-1)}}function We(n,o){if(1&n&&e.nrm(0,"div",13),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Fe(n,o){if(1&n&&e.nrm(0,"storefront-image",14),2&n){const i=e.XpG(4);e.Y8G("height",i.getImageHeight())("src",i.getImageSrc())}}function Oe(n,o){if(1&n&&e.DNE(0,We,1,2,"div",13)(1,Fe,1,2,"storefront-image",14),2&n){const i=e.XpG(3);e.vxM(i.domHelper.leanDom?0:1)}}function Qe(n,o){if(1&n&&(e.qex(0),e.DNE(1,Ue,3,5,"a",10),e.j41(2,"a",11,1),e.nI1(4,"sanitizeUrl"),e.DNE(5,Oe,2,1),e.k0s(),e.bVm()),2&n){const i=e.XpG(2);e.R7$(),e.Y8G("ngIf",i.ad),e.R7$(),e.Y8G("href",e.bMT(4,4,i.getHref()),e.B4B)("target",i.target),e.R7$(3),e.vxM(i.getImageSrc()?5:-1)}}function je(n,o){if(1&n&&(e.qex(0,null,0)(2,3),e.DNE(3,Le,2,1,"ng-container",4)(4,Xe,2,1,"ng-container",4)(5,Me,2,1,"ng-container",4)(6,ze,1,0,"ng-container",4)(7,Qe,6,6,"ng-container",5),e.bVm()()),2&n){const i=o.ngIf,t=e.XpG();e.R7$(2),e.Y8G("ngSwitch",i.type),e.R7$(),e.Y8G("ngSwitchCase","GPT"),e.R7$(),e.Y8G("ngSwitchCase","HTML"),e.R7$(),e.Y8G("ngSwitchCase","TRAFFECTIVE"),e.R7$(),e.Y8G("ngSwitchCase",t.isAdServiceType)}}let Ke=(()=>{var n;class o extends B{}return(n=o).\u0275fac=(()=>{let i;return function(r){return(i||(i=e.xGo(n)))(r||n)}})(),n.\u0275cmp=e.VBU({type:n,selectors:[["div",8,"pxp-ad"]],standalone:!1,features:[e.Jv_([x.B]),e.Vt3],attrs:Re,decls:1,vars:1,consts:[["adContainer",""],["stickyLink",""],[4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"id"],["title","ad",3,"src",4,"ngIf"],["title","ad",3,"src"],["storefrontVisibleOnScroll","",1,"no-display",3,"elementVisible","id"],[3,"href","target",4,"ngIf"],[1,"ad-sticky",3,"href","target"],[3,"href","target"],[1,"pxp-image",3,"height","src"],[3,"height","src"]],template:function(t,r){1&t&&e.DNE(0,je,8,5,"ng-container",2),2&t&&e.Y8G("ngIf",r.ad&&r.ad.providerConfig)},dependencies:[g.bT,g.ux,g.e1,g.fG,S.h,M.x,z,N],styles:["storefront-ad,.pxp-ad{display:block;overflow:hidden}storefront-ad a,.pxp-ad a{display:block}storefront-ad a.ad-sticky,.pxp-ad a.ad-sticky{display:none}storefront-ad storefront-image img.error,storefront-ad .pxp-image img.error,.pxp-ad storefront-image img.error,.pxp-ad .pxp-image img.error{position:relative;width:100vw;height:25vw;background-image:url(/assets/banner/banner_not_found.jpg);background-size:contain;opacity:1}storefront-ad[ad-type=HTML]>iframe,storefront-ad[data-pxp-ad-type=HTML]>iframe,.pxp-ad[ad-type=HTML]>iframe,.pxp-ad[data-pxp-ad-type=HTML]>iframe{width:100%;height:100%}.sticky-elements storefront-ad a,.sticky-elements .pxp-ad a{display:none}.sticky-elements storefront-ad a.ad-sticky,.sticky-elements .pxp-ad a.ad-sticky{display:block}.no-display{display:none}\n"],encapsulation:2}),o})(),He=(()=>{var n;class o{}return(n=o).\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.$C({type:n}),n.\u0275inj=e.G2t({imports:[g.MD,$e.U,Ve.E,we]}),o})();const Ze={component:B,leanDomComponent:Ke}},1803:(Y,C,c)=>{c.d(C,{OE:()=>A,OK:()=>e,TS:()=>g,We:()=>v});var g=function(a){return a.VERTICAL="vertical",a.HORIZONTAL="horizontal",a.GRID="grid",a.GROUP="group",a.TABS="tabs",a}(g||{}),v=function(a){return a.BLANK="_blank",a.SELF="_self",a}(v||{}),e=function(a){return a.div="div",a.a="a",a.br="br",a.button="button",a.dialog="dialog",a.em="em",a.h1="h1",a.h2="h2",a.h3="h3",a.h4="h4",a.h5="h5",a.h6="h6",a.hr="hr",a.iframe="iframe",a.img="img",a.input="input",a.li="li",a.ol="ol",a.p="p",a.pre="pre",a.small="small",a.span="span",a.ul="ul",a.article="article",a.aside="aside",a.details="details",a.figcaption="figcaption",a.figure="figure",a.footer="footer",a.header="header",a.main="main",a.mark="mark",a.nav="nav",a.section="section",a.summary="summary",a.time="time",a}(e||{}),A=function(a){return a.div="div",a.a="a",a.button="button",a.dialog="dialog",a.h1="h1",a.h2="h2",a.h3="h3",a.h4="h4",a.h5="h5",a.h6="h6",a.li="li",a.ol="ol",a.p="p",a.span="span",a.ul="ul",a.article="article",a.aside="aside",a.details="details",a.figcaption="figcaption",a.figure="figure",a.footer="footer",a.header="header",a.main="main",a.mark="mark",a.nav="nav",a.section="section",a.summary="summary",a.time="time",a}(A||{})}}]);