1import{a as ct}from"./chunk-RPOMAAVI.js";import{a as st}from"./chunk-KT6JQNBG.js";import{j as at}from"./chunk-WRDUXZX6.js";import"./chunk-4HJOMHUH.js";import"./chunk-AC4YEBWG.js";import{a as lt}from"./chunk-2AOOQWIT.js";import{a as rt}from"./chunk-Q5LJUV3L.js";import"./chunk-3O4NXPYV.js";import"./chunk-SOWNSDVS.js";import{f as et}from"./chunk-D3ED5CAA.js";import"./chunk-KUNUQ3OS.js";import{A as J,d as E,g as L,h as Y,n as Q,q as G,t as K,y as X}from"./chunk-FE4OSO6A.js";import"./chunk-5MARIEUK.js";import{a as it,b as ot}from"./chunk-PLY5JERT.js";import"./chunk-W4TN3D7V.js";import{b as nt,c as V}from"./chunk-SGFDMKOB.js";import{S as tt}from"./chunk-FBKQDMH7.js";import{a as Z}from"./chunk-UYAJYTOD.js";import{j as U}from"./chunk-GM3TIB7Z.js";import"./chunk-QL6YS5OU.js";import"./chunk-FZ7WUL3C.js";import{a as ft}from"./chunk-RCUPQHA7.js";import{a as H,h as $}from"./chunk-YJOMLR5S.js";import{Cb as j,Cc as C,Db as x,Dc as d,Fa as g,Ga as v,Jc as P,Kc as I,Lc as M,Ob as z,Qc as w,Sa as W,Sc as _,Ub as h,Va as T,ad as S,bd as k,hc as c,nc as u,sc as p,sd as D,tc as s,ua as N,uc as f,vb as F,xb as o,yc as b}from"./chunk-P3WUMIUN.js";import"./chunk-2OY4FR2S.js";import{a as B,b as R,e as ut,f as O,g as q,h as A}from"./chunk-P7UHXAQQ.js";var y=ut(ft(),1);var ht=["stickyContainer"],xt=["funnelEntryContainer"],wt=(i,l)=>({"fixed bottom-0 left-0 right-0 z-50 rounded-lg":i,relative:l}),_t=(i,l)=>({"fixed bottom-0 left-0 right-0 z-50 pb-0":i,relative:l}),yt=i=>({"m:left-0 m:px-9 l:px-14 xl:px-16":i}),Ct=i=>({"w-full":i}),gt=(i,l)=>({"bg-ewp-ui-bg-container-secondary p-3":i,"pt-2":l}),vt=i=>({templateId:"ewpText",textPlain:i});function Et(i,l){if(i&1){let e=b();p(0,"div",2,0)(2,"div",4)(3,"div",5)(4,"div",6)(5,"a",7),w(6),s(),f(7,"ewp-richtext",8),s(),p(8,"ewp-cta",9),C("ctaClicked",function(){g(e);let t=d(2);return v(t.expandComponent())}),s()()()()}if(i&2){let e=d(2);c("ngClass",k(4,wt,e.isMobile,!e.isMobile)),o(6),_(" ",e.content().funnelEntryComponent.title," "),o(),c("content",e.content().introComponent.richtext),o(),c("content",e.content().introComponent.cta)}}function bt(i,l){i&1&&f(0,"div",3)}function St(i,l){if(i&1){let e=b();p(0,"ewp-icon",26),C("click",function(){g(e);let t=d(3);return v(t.collapseComponent())}),s()}if(i&2){let e=d(3);c("content",e.closeIcon)}}function kt(i,l){if(i&1&&(p(0,"div",23),w(1),s()),i&2){let e=d(3);o(),_(" ",e.content().funnelEntryComponent.licencePlate.licencePlateNumber.errorMsg," ")}}function Tt(i,l){if(i&1&&(p(0,"div",23),w(1),s()),i&2){let e=d(4);o(),_(" ",e.content().funnelEntryComponent.contact.errorMsg," ")}}function Ft(i,l){if(i&1&&(p(0,"div",18),f(1,"ewp-input-field",27),h(2,Tt,2,1,"div",23),s()),i&2){let e,a=d(3);o(),c("content",a.content().funnelEntryComponent.contact),o(),u((e=a.form.get("contact"))!=null&&e.invalid&&((e=a.form.get("contact"))!=null&&e.touched)&&a.content().funnelEntryComponent.contact.errorMsg?2:-1)}}function Pt(i,l){if(i&1&&(p(0,"div",23),w(1),s()),i&2){let e,a=d(4);o(),_(" ",(e=a.content().funnelEntryComponent.customerType)==null?null:e.errorMsg," ")}}function It(i,l){if(i&1&&(p(0,"div",18),f(1,"ewp-select",28),h(2,Pt,2,1,"div",23),s()),i&2){let e,a=d(3);o(),c("content",a.customerTypeSelectContent),o(),u((e=a.form.get("customerType"))!=null&&e.invalid&&((e=a.form.get("customerType"))!=null&&e.touched)&&((e=a.content().funnelEntryComponent.customerType)!=null&&e.errorMsg)?2:-1)}}function Mt(i,l){if(i&1&&(p(0,"div",34),f(1,"div",35)(2,"ewp-richtext",36),s()),i&2){let e=d(4);o(2),c("content",e.content().funnelEntryComponent.tooltipText)}}function Vt(i,l){if(i&1){let e=b();p(0,"div",25),f(1,"ewp-icon",29),p(2,"div",30),f(3,"ewp-richtext",31),p(4,"div",32)(5,"ewp-text",33),C("click",function(){g(e);let t=d(3);return v(t.toggleTooltip())}),w(6),s(),h(7,Mt,3,1,"div",34),s()()()}if(i&2){let e,a,t=d(3);c("ngClass",k(6,gt,t.isMobile,!t.isMobile)),o(),c("content",t.infoIcon),o(2),c("content",t.content().funnelEntryComponent.infoText),o(2),c("content",S(9,vt,((e=t.content().funnelEntryComponent.moreInformation)==null?null:e.wysiwyg)||"")),o(),_(" ",(a=t.content().funnelEntryComponent.moreInformation)==null?null:a.wysiwyg," "),o(),u(t.isTooltipVisible?7:-1)}}function Bt(i,l){if(i&1){let e=b();p(0,"div",2,0)(2,"form",10),C("ngSubmit",function(){g(e);let t=d(2);return v(t.onSubmit())}),p(3,"div",11,1)(5,"div",12)(6,"div",13)(7,"div",14),h(8,St,1,1,"ewp-icon",15),p(9,"a",16),w(10),s(),f(11,"ewp-richtext",8),s(),p(12,"div",17)(13,"div",18)(14,"div",19)(15,"div",20),f(16,"ewp-icon",21),s(),f(17,"ewp-input-field",22),s(),h(18,kt,2,1,"div",23),s(),h(19,Ft,3,2,"div",18)(20,It,3,2,"div",18),p(21,"button",24),C("click",function(){g(e);let t=d(2);return v(t.onSubmit())}),w(22),s()()(),h(23,Vt,8,11,"div",25),s()()()()}if(i&2){let e,a,t,n=d(2);c("ngClass",k(15,_t,n.isMobile&&n.content().funnelEntryComponent.isSticky,!n.isMobile)),o(2),c("formGroup",n.form),o(),c("ngClass",S(18,yt,n.isSticky())),o(4),c("ngClass",S(20,Ct,n.isMobile&&n.isExpanded)),o(),u(n.isMobile&&n.isExpanded?8:-1),o(2),_(" ",n.content().funnelEntryComponent.title," "),o(),c("content",n.content().funnelEntryComponent.richtext),o(5),c("content",n.content().funnelEntryComponent.licencePlate.icon),o(),c("content",n.content().funnelEntryComponent.licencePlate.licencePlateNumber),o(),u((e=n.form.get("licensePlate"))!=null&&e.invali
1d&&((e=n.form.get("licensePlate"))!=null&&e.touched)?18:-1),o(),u(n.content().funnelEntryComponent.contact?19:-1),o(),u(n.content().funnelEntryComponent.customerType?20:-1),o(),c("content",(a=n.content().funnelEntryComponent)==null?null:a.cta),o(),_(" ",(t=n.content().funnelEntryComponent)==null||t.cta==null||t.cta.link==null?null:t.cta.link.text," "),o(),u(n.showInfoText?23:-1)}}function Rt(i,l){if(i&1&&h(0,Et,9,7,"div",2)(1,bt,1,0,"div",3)(2,Bt,24,22,"div",2),i&2){let e=d();u(e.isMobile&&!e.isExpanded&&e.content().funnelEntryComponent.isSticky?0:-1),o(),u(e.isMobile&&e.isExpanded?1:-1),o(),u(!e.isMobile||!e.content().funnelEntryComponent.isSticky||e.isExpanded?2:-1)}}var ee=(()=>{var l;let e=class e{constructor(t,n,r,m,pt,dt,mt){q(this,l);this.fb=t,this.router=n,this.renderer=r,this.cdr=m,this.cmsFacade=pt,this.isBrowser=dt,this.document=mt,this.Alignment=y.Alignment,this.HTag=y.HTag,A(this,l,N(et)),this.content=W.required(),this.isTooltipVisible=!1,this.shouldShowFunnelEntry=!0,this.infoIcon=V.NotICInfoCircle,this.closeIcon=V.Close,this.headerHeight=0,this.originalWidth="",this.isSticky=T(!1),this.isScrolling=T(!1),this.isMobile=!1,this.isExpanded=!1,this.showInfoText=!0,this.LICENSE_PLATE_KEY="wb_licensePlate",this.VALIDITY_DATE_KEY="wb_validityDate",this.currentPage=""}ngOnInit(){this.initForm(),this.checkContinueBooking(),this.getCurrentPage(),this.initCustomerTypeSelect()}ngAfterViewInit(){if(!this.isBrowser)return;let t=this.document.querySelector("ewp-header");this.headerHeight=t?t.getBoundingClientRect().bottom:0,this.isMobile=window.innerWidth<768,this.isMobile||(this.isExpanded=!0),setTimeout(()=>this.onWindowScroll(),0)}onWindowScroll(){!this.isBrowser||this.isMobile||!this.isExpanded||window.requestAnimationFrame(()=>{let t=this.stickyContainer?.nativeElement,n=this.funnelEntryContainer?.nativeElement;if(!t||!n)return;let r=t.getBoundingClientRect();this.content()?.funnelEntryComponent.isSticky&&(r.top<this.headerHeight?(this.showInfoText=!1,this.isSticky.set(!0),this.isScrolling.set(!0),this.applyStickyStyles(n)):(this.showInfoText=!0,this.isSticky.set(!1),this.isScrolling.set(!0),this.removeStickyStyles(n)))})}onWindowResize(){if(!this.isBrowser)return;let t=window.innerWidth<768;t!==this.isMobile&&(this.isExpanded=!t),this.isMobile=t;let n=this.document.querySelector("ewp-header");this.headerHeight=n?n.getBoundingClientRect().bottom:0;let r=this.funnelEntryContainer?.nativeElement;this.isSticky()&&r&&this.removeStickyStyles(r),this.isSticky()&&r&&this.applyStickyStyles(r),this.cdr.detectChanges()}initForm(){let t=this.content().funnelEntryComponent;t.contact?.inputType===y.InputType.Email?this.form=this.fb.group({licensePlate:["",[E.required,this.licensePlateValidator(t.licencePlate.regex)]],contact:["",[E.required,...at()]],customerType:["",t.customerType?[E.required]:[]]}):this.form=this.fb.group({licensePlate:["",[E.required,this.licensePlateValidator(t.licencePlate.regex)]],contact:["",...t?.regex?[this.phoneValidator(t.regex)]:[]],customerType:["",t.customerType?[E.required]:[]]})}licensePlateValidator(t){return n=>n.value?RegExp(t,"i").test(n.value)?null:{invalidLicensePlate:!0}:{required:!0}}phoneValidator(t){return n=>n.value?RegExp(t,"i").test(n.value)?null:{invalidPhone:!0}:{required:!0}}onSubmit(){if(this.isBrowser)if(this.form.valid){this.triggerSearchEvent();let t=this.form.value.licensePlate,n=this.form.value.customerType,r={licenseplate:t,customerType:n};this.content().funnelEntryComponent.contact?.inputType===y.InputType.Email?r.email=this.form.value.contact:r.phoneNumber=this.form.value.contact,this.content().funnelEntryComponent.cta?.link.external?this.document.location.href=this.buildUrlWithParamsFromForm():this.router.navigate([this.content().funnelEntryComponent.cta?.link.href],{queryParams:r})}else this.form.markAllAsTouched()}buildUrlWithParamsFromForm(){let{contact:t,licensePlate:n,customerType:r}=this.form.value,m;return this.content().funnelEntryComponent.contact?.inputType===y.InputType.Email?m=`${this.content().funnelEntryComponent.cta?.link.href}?email=${encodeURIComponent(t)}&licenseplate=${encodeURIComponent(n)}&source=${encodeURIComponent(r)}`:m=`${this.content().funnelEntryComponent.cta?.link.href}?phoneNumber=${encodeURIComponent(t)}&licenseplate=${encodeURIComponent(n)}&source=${encodeURIComponent(r)}`,this.isAbsoluteUrl(this.content().funnelEntryComponent.cta?.link.href)?m:`${this.document.location.origin}${m}`}isAbsoluteUrl(t){return/^(https?:\/\/)/.test(t)}checkContinueBooking(){if(this.content().funnelEntryComponent.hideIfContinueBooking&&this.content().funnelEntryComponent.isSticky&&this.isBrowser){let t=localStorage.getItem(this.LICENSE_PLATE_KEY),n=localStorage.getItem(this.VALIDITY_DATE_KEY);t&&n&&new Date(n)>new Date&&(this.shouldShowFunnelEntry=!1)}}toggleTooltip(){this.adjustTooltipPosition(),this.isTooltipVisible=!this.isTooltipVisible}adjustTooltipPosition(){let t=this.document.querySelector(".tooltip-container");if(!t)return;let n=t.getBoundingClientRect(),r=window.innerWidth;n.left<16?(t.style.left="16px",t.style.transform="none"):n.right>r-16?(t.style.left="auto",t.style.right="16px",t.style.transform="none"):(t.style.left="50%",t.style.right="auto",t.style.transform="translateX(-50%)")}expandComponent(){this.isBrowser&&(this.isExpanded=!0,this.renderer.setStyle(this.document.body,"overflow","hidden"))}collapseComponent(){this.isBrowser&&(this.isExpanded=!1,this.renderer.removeStyle(this.document.body,"overflow"))}applyStickyStyles(t){this.renderer.setStyle(t,"position","fixed"),this.renderer.setStyle(t,"top",`${this.headerHeight}px`)}removeStickyStyles(t){this.renderer.removeStyle(t,"position"),this.renderer.removeStyle(t,"top")}getCurrentPage(){this.cmsFacade.getCurrentPage$.subscribe(t=>{this.currentPage=t?.name||""})}initCustomerTypeSelect(){let t=this.content().funnelEntryComponent.customerType;this.customerTypeSelectContent=R(B({},t),{name:"customerType",placeholder:t?.placeholder,required:t?.required,selectOptions:(t?.options||[]).map(n=>({label:n?.text?.textPlain,selectValue:n?.value}))})}triggerSearchEvent(){O(this,l).trackEvent({event:"tracking_event",event_category:"content-pages",event_action:"quoteJourney-starter",event_label:this.currentPage})}};l=new WeakMap,e.\u0275fac=function(n){return new(n||e)(x(X),x(U),x(j),x(D),x(tt),x(Z),x(H))},e.\u0275cmp=z({type:e,selectors:[["ewp-standalone-funnel-entry"]],viewQuery:function(n,r){if(n&1&&(P(ht,5),P(xt,5)),n&2){let m;
1I(m=M())&&(r.stickyContainer=m.first),I(m=M())&&(r.funnelEntryContainer=m.first)}},hostBindings:function(n,r){n&1&&C("scroll",function(){return r.onWindowScroll()},!1,F)("resize",function(){return r.onWindowResize()},!1,F)},inputs:{content:[1,"content"]},decls:1,vars:1,consts:[["stickyContainer",""],["funnelEntryContainer",""],[3,"ngClass"],[1,"fixed","inset-0","z-40","bg-black","opacity-20"],[1,"w-full"],[1,"funnel-entry-container"],[1,"flex","flex-col","gap-2"],[1,"text-ewp-headline-s","!font-ewp-fw-bold","text-ewp-ui-headline-dark"],[1,"font-ewp-primary","text-ewp-ui-copy-dark",3,"content"],[1,"btn-f","w-full","m:w-auto",3,"ctaClicked","content"],[3,"ngSubmit","formGroup"],[1,"content-wrapper","z-10","w-full","max-w-[1296px]","rounded-t-lg","xxl:left-auto","xxl:px-0",3,"ngClass"],[1,"w-max[1296px]","x-4","sm:px-8","sm:py-10","md:px-14","md:py-14","lg:px-16","lg:pt-14","lg:pb-14","w-full","pb-0","pt-4"],[1,"flex","flex-col","items-start","gap-6","rounded-lg","bg-ewp-ui-bg-container-secondary","p-4","m:flex-row","m:flex-wrap"],[1,"flex","flex-col","items-start","gap-1",3,"ngClass"],[1,"ml-auto",3,"content"],[1,"headline-text"],[1,"flex","w-full","flex-1","flex-col","items-stretch","justify-between","gap-2","m:min-w-[560px]","m:flex-row"],[1,"sm:w-full","flex","h-full","flex-1","flex-col"],[1,"flex","items-center","rounded-r-[2px]","bg-white","shadow-sm"],[1,"flex","w-[32px]","items-center","justify-center","rounded-l-[2px]","bg-ewp-ui-bg-flag-eu","p-2"],[1,"h-10","w-[24px]",3,"content"],["formControlName","licensePlate",1,"input-field","h-full","flex-1","border-0","focus:ring-0",3,"content"],[1,"error-message"],["ewpSharedButton","","type","button",1,"btn-f","h-10","w-full","m:h-14","m:w-auto",3,"click","content"],[1,"md:p-0","relative","flex","w-full","items-start","gap-1","rounded-b-lg",3,"ngClass"],[1,"ml-auto",3,"click","content"],["formControlName","contact",1,"sm:w-full","input-field","h-full","flex-1",3,"content"],["formControlName","customerType",1,"select","h-full","flex-1",3,"content"],[1,"h-6","w-6","flex-shrink-0","p-1",3,"content"],[1,"relative","flex","min-w-0","flex-wrap","items-baseline"],[1,"p-1","font-ewp-primary","text-ewp-ui-copy-dark",3,"content"],[1,"relative"],[1,"tooltip-link-text",3,"click","content"],[1,"tooltip-container"],[1,"tooltip-arrow"],[3,"content"]],template:function(n,r){n&1&&h(0,Rt,3,3),n&2&&u(r.shouldShowFunnelEntry?0:-1)},dependencies:[$,J,Q,L,Y,G,K,nt,lt,rt,ct,it,ot,st],styles:['ewp-cta.btn-f a{height:3.5rem!important}@media(width<768px){ ewp-cta.btn-f a{width:100%}} ewp-input-field.input-field input{background-color:var(--ewp-ui-bg-input-default-dark, #F2F2F2)}.funnel-entry-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1.5rem;align-self:stretch;border-top-left-radius:.5rem;border-top-right-radius:.5rem;background-color:var(--ewp-ui-bg-container-secondary, #FAFAFA);padding:1rem 1rem 2rem}.form-row[_ngcontent-%COMP%]{display:flex;width:100%;flex:1 1 0%;flex-direction:column;flex-wrap:wrap;align-items:stretch;justify-content:space-between;gap:.5rem}.tooltip-container[_ngcontent-%COMP%]{position:absolute;z-index:50;width:100%;max-width:90vw;border-radius:.5rem;border-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:.75rem;--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);
1--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}@media(min-width:768px){.tooltip-container[_ngcontent-%COMP%]{max-width:420px}}.tooltip-container[_ngcontent-%COMP%]{left:50%;top:100%;transform:translate(-50%);margin-top:.5rem}@media(width<=768px){.tooltip-container[_ngcontent-%COMP%]{left:90%;width:90vw;top:auto;bottom:100%;margin-bottom:.5rem}}.tooltip-arrow[_ngcontent-%COMP%]{position:absolute;top:-.5rem;left:50%;height:1rem;width:1rem;--tw-translate-x: -50%;--tw-rotate: 45deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));border-left-width:1px;border-top-width:1px;--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}@media(width<=768px){.tooltip-arrow[_ngcontent-%COMP%]{top:auto;bottom:-.4rem;border-width:0 1px 1px 0}}.error-message[_ngcontent-%COMP%]{padding-top:.25rem;text-align:left;font-family:var(--ewp-primary),"Work Sans";font-size:var(--ewp-copy-s-font-size, 12px);line-height:var(--ewp-copy-s-line-height, 18px);color:var(--ewp-ui-text-feedback-error, #E60F04)}.tooltip-link-text[_ngcontent-%COMP%]{cursor:pointer;padding-top:.25rem;font-weight:var(--ewp-fw-normal, 400);color:var(--ewp-ui-copy-link-hover, #9B0B03);text-decoration-line:underline}.headline-text[_ngcontent-%COMP%]{font-size:var(--ewp-headline-s-font-size, 20px);font-weight:var(--ewp-fw-bold, 600);color:var(--ewp-ui-headline-dark, #000000)}[_nghost-%COMP%] ewp-input-field .mat-mdc-text-field-wrapper{background-color:var(--ewp-ui-bg-input-default-dark, #F2F2F2)}[_nghost-%COMP%] ewp-select.select .mat-mdc-text-field-wrapper{background-color:var(--ewp-ui-bg-input-default-dark, #F2F2F2)}[_nghost-%COMP%] .ewp-select mat-form-field.ng-touched.ng-invalid mat-label{color:var(--ewp-ui-text-feedback-error, #E60F04)}[_nghost-%COMP%] .ewp-select mat-form-field.ng-touched.ng-invalid .mat-mdc-text-field-wrapper:before, [_nghost-%COMP%] .ewp-select mat-form-field.ng-touched.ng-invalid .mat-mdc-text-field-wrapper:after, [_nghost-%COMP%] .ewp-select mat-form-field.ng-touched.ng-invalid .mdc-line-ripple:before, [_nghost-%COMP%] .ewp-select mat-form-field.ng-touched.ng-invalid .mdc-line-ripple:after{background-color:var(--ewp-ui-border-feedback-error, #E60F04)}']});let i=e;return i})();export{ee as StandaloneFunnelEntryComponent};
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.