import{Lb as c,Lc as f,M as v,Mc as m,P as y}from"./chunk-GWUVPOWZ.js";import{a as l}from"./chunk-KRVUSFHP.js";var k=class e{constructor(t){this.toLockerType=t}trackEvent(t,n){switch(t){case"lead":this.trackLeadEvent();break;case"abschluss":this.trackOrderEvent("Purchase",n||{});break;case"rechnungsadresse":this.trackOrderEvent("CompleteRegistration",n||{});break;case"bankdaten":this.trackOrderEvent("AddPaymentInfo",n||{});break}}trackOrderEvent(t,n){if(typeof fbq=="function"){let o=this.toLockerType.transform(n.locker.lockerTypeId);fbq("track",t,{content_name:o,contents:[{id:o,quantity:1},{id:n.contract.depositOrInsurance==="deposit"?"Kaution":"Schutzbrief",quantity:1}],currency:"EUR",value:n.locker.prices[0]*12+(n.contract.depositOrInsurance==="deposit"?f.deposit:f.insurance)})}}trackLeadEvent(){typeof fbq=="function"&&fbq("track","Lead")}static{this.\u0275fac=function(n){return new(n||e)(y(m))}}static{this.\u0275prov=v({token:e,factory:e.\u0275fac,providedIn:"root"})}};var b=(e,t,n)=>{typeof gtag<"u"&&c.sendGAEvents&&gtag("event",e,{event_category:t,event_label:n})},P=e=>{typeof gtag<"u"&&c.sendGAEvents&&c.gaId.forEach(t=>{gtag("config",t,{page_path:e})})},h=(e,t)=>{e==="default"&&(t=l({ad_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",analytics_storage:"denied",functionality_storage:"denied",personalization_storage:"denied",security_storage:"denied"},t)),gtag("consent",e,t)},A=()=>{if(typeof gtag<"u")return;let e=document.createElement("script");e.type="text/javascript",e.src=`${c.gtagUrl}?id=${c.gaId}`,e.onload=()=>{window.dataLayer=window.dataLayer||[],window.gtag=function(...t){window.dataLayer.push(arguments)},h("default",{analytics_storage:"granted"}),window.gtag("js",new Date),c.gaId.forEach(t=>{window.gtag("config",t,{send_page_view:!1,anonymize_ip:!0})})},document.getElementsByTagName("body")[0].appendChild(e)};function g(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)e[o]=n[o]}return e}var w={read:function(e){return e[0]==='"'&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function u(e,t){function n(a,s,r){if(!(typeof document>"u")){r=g({},t,r),typeof r.expires=="number"&&(r.expires=new Date(Date.now()+r.expires*864e5)),r.expires&&(r.expires=r.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var d in r)r[d]&&(i+="; "+d,r[d]!==!0&&(i+="="+r[d].split(";")[0]));return document.cookie=a+"="+e.write(s,a)+i}}function o(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var s=document.cookie?document.cookie.split("; "):[],r={},i=0;i<s.length;i++){var d=s[i].split("="),T=d.slice(1).join("=");try{var p=decodeURIComponent(d[0]);if(r[p]=e.read(T,p),a===p)break}catch{}}return a?r[a]:r}}return Object.create({set:n,get:o,remove:function(a,s){n(a,"",g({},s,{expires:-1}))},withAttributes:function(a){return u(this.converter,g({},this.attributes,a))},withConverter:function(a){return u(g({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(t)},converter:{value:Object.freeze(e)}})}var j=u(w,{path:"/"});export{k as a,j as b,b as c,P as d,A as e};