1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e._posthogReleaseId=e._posthogReleaseId||"01a10c65-0dc9-0000-e243-88db3ea3c620";var n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="cd8e6a65-aba2-5ea6-9414-ae9d00cbc55a")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[81883],{3866:(e,t,n)=>{n.d(t,{t:()=>i});let i=(0,n(14232).createContext)(null)},5048:(e,t,n)=>{n.d(t,{L:()=>i});let i=(0,n(14232).createContext)({})},8686:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(37876),a=n(76679);function l({title:e,description:t,children:n,sx:r,...o}){return(0,i.jsxs)(a.BJ,{alignItems:"center",justifyContent:"center",sx:{height:"100%",textAlign:"center",p:e=>e?.spacing(8,2),...r},...o,children:[(0,i.jsx)(a.o5,{variant:"h5",gutterBottom:!0,children:e}),t&&(0,i.jsx)(a.o5,{variant:"body2",sx:{color:"text.secondary"},children:t}),n]})}},12636:(e,t,n)=>{n.d(t,{A:()=>A});var i,a=n(14232),l=n(69241),r=n(86583),o=n(65559),s=n(82702),d=n(71785),m=n(21477),u=n(34401),c=n(35985),p=n(96968),b=n(74468),f=n(37876);let g=(e,t)=>{let{ownerState:n}=e;return[t.root,t[`position${(0,o.A)(n.position)}`],!0===n.disablePointerEvents&&t.disablePointerEvents,t[n.variant]]},x=e=>{let{classes:t,disablePointerEvents:n,hiddenLabel:i,position:a,size:l,variant:s}=e,d={root:["root",n&&"disablePointerEvents",a&&`position${(0,o.A)(a)}`,s,i&&"hiddenLabel",l&&`size${(0,o.A)(l)}`]};return(0,r.A)(d,b.P,t)},y=(0,u.Ay)("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:g})((0,c.A)(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${b.A.positionStart}&:not(.${b.A.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),A=a.forwardRef(function(e,t){let n=(0,p.b)({props:e,name:"MuiInputAdornment"}),{children:r,className:o,component:u="div",disablePointerEvents:c=!1,disableTypography:b=!1,position:g,variant:A,...h}=n,$=(0,m.A)()||{},v=A;A&&$.variant,$&&!v&&(v=$.variant);let _={...n,hiddenLabel:$.hiddenLabel,size:$.size,disablePointerEvents:c,position:g,variant:v},k=x(_);return(0,f.jsx)(d.A.Provider,{value:null,children:(0,f.jsx)(y,{as:u,ownerState:_,className:(0,l.A)(k.root,o),ref:t,...h,children:"string"!=typeof r||b?(0,f.jsxs)(a.Fragment,{children:["start"===g?i||(i=(0,f.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"â"})):null,r]}):(0,f.jsx)(s.A,{color:"textSecondary",children:r})})})})},14382:(e,t,n)=>{let i;n.r(t),n.d(t,{FormElement:()=>Z});var a=n(37876),l=n(29911),r=n(7927),o=n(12442),s=n(40219),d=function(e){return e.Eq="===",e.Ne="!==",e.Gt=">",e.Gte=">=",e.Lt="<",e.Lte="<=",e}({}),m=function(e){return e.Check="check",e.Files="files",e.GridContainer="gridContainer",e.GridItem="gridItem",e.Hidden="hidden",e.Infotext="infoText",e.Location="standort",e.Radio="radio",e.Range="range",e.ResetButton="resetButton",e.Select="select",e.Slider="slider",e.Spacer="spacer",e.SubmitButton="submitButton",e.Date="date",e.DateTime="datetime-local",e.Mail="email",e.Number="number",e.Telefon="tel",e.Text="text",e.TextArea="textarea",e.Time="time",e}({}),u=n(74073),c=n(73116),p=n(99659),b=n(1899),f=n(18847),g=n.n(f),x=n(89099),y=n(14232),A=n(49106),h=n(63571),$=n(46812),v=n(23735),_=n(24934),k=n(63458),j=n(97312),C=n(73518),w=n(42299),S=n(84549),T=n(20954);let F={alignItems:void 0,justifyContent:void 0,id:void 0,label:void 0,type:m.GridContainer,spacing:2,elements:[]},R={id:void 0,label:void 0,type:m.GridItem,sm:12,md:6,lg:6,elements:[{type:m.Location,id:"standort",label:"Standort",required:!0,validation:void 0}]},q={id:void 0,label:void 0,type:m.GridItem,sm:12,md:6,lg:6,elements:[{type:m.Select,options:["Allgemeine Anfrage","Fahrzeug Anfrage","Service Anfrage"],defaultValue:"Allgemeine Anfrage",id:"anfrageart",label:"Anfrageart",required:!0,validation:void 0}]};var I=n(45711),E=n(76679),O=n(16768),B=n(93644),G=n(21179);let L=g()(()=>Promise.all([n.e(46593),n.e(63115),n.e(92434),n.e(14243),n.e(93796),n.e(33460),n.e(4231),n.e(42976),n.e(26278),n.e(71620),n.e(11289),n.e(54083),n.e(13796),n.e(70401),n.e(43716),n.e(69407),n.e(12130),n.e(65415),n.e(31704),n.e(64312),n.e(95352),n.e(84611),n.e(71147),n.e(1044),n.e(48182),n.e(49331),n.e(9125),n.e(12372),n.e(45489)]).then(n.t.bind(n,51797,23)).then(e=>e.BlocksControls),{loadableGenerated:{webpack:()=>[51797]},ssr:!1}),D=g()(()=>Promise.all([n.e(95367),n.e(12559),n.e(6748),n.e(9422),n.e(16766),n.e(90566),n.e(1942),n.e(51781)]).then(n.bind(n,17209)).then(e=>
1e.ButtonLinkElement),{loadableGenerated:{webpack:()=>[17209]},loading:()=>(0,a.jsx)(I.Wp,{})}),P=g()(()=>Promise.resolve().then(n.bind(n,4106)).then(e=>e.default),{loadableGenerated:{webpack:()=>[4106]},loading:()=>(0,a.jsx)(I.tL,{})}),M=g()(()=>Promise.resolve().then(n.bind(n,95817)).then(e=>e.default),{loadableGenerated:{webpack:()=>[95817]},loading:()=>(0,a.jsx)(I.t8,{})}),N=g()(()=>Promise.all([n.e(9422),n.e(1942),n.e(55293)]).then(n.bind(n,87112)).then(e=>e.InputCheckElement),{loadableGenerated:{webpack:()=>[87112]},loading:()=>(0,a.jsx)(I.cV,{})}),z=g()(()=>n.e(18130).then(n.bind(n,49145)).then(e=>e.InputDateTimeElement),{loadableGenerated:{webpack:()=>[49145]},loading:()=>(0,a.jsx)(I.cV,{})}),J=g()(()=>Promise.all([n.e(9422),n.e(1942),n.e(96786)]).then(n.bind(n,47859)).then(e=>e.InputRadioElement),{loadableGenerated:{webpack:()=>[47859]},loading:()=>(0,a.jsx)(I.cV,{})}),V=g()(()=>n.e(84871).then(n.bind(n,93368)).then(e=>e.InputSelectElement),{loadableGenerated:{webpack:()=>[93368]},loading:()=>(0,a.jsx)(I.cV,{})}),W=g()(()=>n.e(52982).then(n.bind(n,13457)).then(e=>e.InputSliderElement),{loadableGenerated:{webpack:()=>[13457]},loading:()=>(0,a.jsx)(I.cV,{})}),U=g()(()=>n.e(17580).then(n.bind(n,46983)).then(e=>e.InputTextElement),{loadableGenerated:{webpack:()=>[46983]},loading:()=>(0,a.jsx)(I.cV,{})}),H=g()(()=>n.e(97333).then(n.bind(n,34985)).then(e=>e.SpacerElement),{loadableGenerated:{webpack:()=>[34985]},loading:()=>(0,a.jsx)(I.ez,{})}),K=g()(()=>Promise.resolve().then(n.bind(n,99439)).then(e=>e.default),{loadableGenerated:{webpack:()=>[99439]},loading:()=>(0,a.jsx)(I.r5,{})});function Z(e){let{additionals:t,embed:n=!1,index:f=0,name:g}=e,I=(0,S.useBlocksContext)(),Z=(0,T.useProjectContext)(),{push:Y,asPath:Q}=(0,x.useRouter)(),{duplicate:X}=(0,h.P)(),ee=(0,A.A)(),[et,en]=(0,y.useState)([]),[ei,ea]=(0,y.useState)({}),[el,er]=(0,y.useState)({}),[eo,es]=(0,y.useState)(!1),[ed,em]=(0,y.useState)([]),[eu,ec]=(0,y.useState)(void 0),ep=(0,y.useMemo)(()=>I?.[G.K]?.template?.defaultItem,[I]),eb=(0,y.useMemo)(()=>(0,k.A)({},ep,e.data),[ep,e.data]),ef=Z?.settings?.forms?.autoMails,eg=ef?eb?.content?.automail?.requestType:void 0,ex=ef?eb?.content?.automail?.selectLocations:eb?.content?.selectLocations,ey={[d.Eq]:(e,t)=>e===t,[d.Ne]:(e,t)=>e!==t,[d.Gt]:(e,t)=>e>t,[d.Gte]:(e,t)=>e>=t,[d.Lt]:(e,t)=>e<t,[d.Lte]:(e,t)=>e<=t},eA=(0,y.useCallback)((e,t)=>{let n=[];if(n.push(R),(0,l.A)(ei?.standort)||(0,l.A)(t))n.push(q);else{let e=(0,c.m)(q),i=[];for(let e=0;e<t?.length;e++){let n=t?.[e],a=parseInt(ei?.standort)===n?.i,r=n?.cf?.reduce((e,t)=>{if(!(0,l.A)(eg)&&eg!==t?.responsibility)return e;return[...e,t?.responsibility]},[]);a&&r?.forEach(e=>{let t=O.d?.find(t=>t?.id===e)?.name;i.push(t)})}i?.length===0&&i.push("Allgemeine Anfrage"),e.elements[0].options=(0,u.s)(i?.sort()),e.elements[0].defaultValue=e?.elements?.[0]?.options?.[0],(0,j.A)({id:e?.elements?.[0]?.id,val:e.elements[0].defaultValue},ei,ea,el,er),n.push(e)}let i=e?.map(e=>(e?.type!==m.GridContainer||(0,l.A)(e?.elements)||(e.elements=e.elements.reduce((e,t)=>{let n=t?.elements?.filter(e=>e?.id!=="standort");return t.elements=n,e.push(t),e},[])),e?.type!==m.GridContainer||(0,l.A)(e?.elements)||(e.elements=e.elements.reduce((e,t)=>{let n=t?.elements?.filter(e=>e?.id!=="anfrageart");return t.elements=n,e.push(t),e},[])),e)),a=i,r=F;return r.elements=n,a=[r,{id:void 0,height:16,label:void 0,type:m.Spacer},...i||[]]},[ei?.standort,eg]),eh=(0,y.useCallback)(e=>{let t={};return!(0,l.A)(e)&&Array.isArray(e)&&e?.map(e=>{let{type:n}=e;if(n===m.GridContainer||n===m.GridItem){let{elements:n}=e;(0,l.A)(n)||(t={...t,...eh(n)})}else if(n===m.Hidden){let{id:n,value:i}=e;(0,l.A)(n)||(0,l.A)(i)||(t[n]=i)}else if(n===m.Radio){let{defaultValue:n,id:i}=e;(0,l.A)(i)||(0,l.A)(n)||(t[i]=n)}else if(n===m.Select){let{defaultValue:n,id:i,options:a}=e;(0,l.A)(i)||(0,l.A)(n)?(0,l.A)(i)||a?.length!==1||(t[i]=a?.[0]):t[i]=n}else if(n===m.Location){let{defaultValue:n,id:i}=e;(0,l.A)(i)||(0,l.A)(n)?(0,l.A)(i)||ed?.length!==1||(t[i]=ed?.[0].i?.toString()):t[i]=n}else if(n===m.Range){let{defaultValue:n,id:i,max:a,min:r}=e;(0,l.A)(i)||(0,l.A)(n)?(0,l.A)(i)||(0,l.A)(a)&&(0,l.A)(r)||(t[i]=[r,a].join(" - ")):t[i]=n}else if(n===m.Slider){let{defaultValue:n,id:i,min:a}=e;
1(0,l.A)(i)||(0,l.A)(n)?(0,l.A)(i)||(0,l.A)(a)||(t[i]=a):t[i]=n}else if(n===m.Check||n===m.Date||n===m.DateTime||n===m.Mail||n===m.Number||n===m.Telefon||n===m.Text||n===m.TextArea||n===m.Time){let{defaultValue:n,id:i}=e;(0,l.A)(i)||(0,l.A)(n)||(t[i]=n)}}),t},[ed]),e$=e=>{if((0,l.A)(e?.id)||!ek(e))return;let t=ei[e?.id];if(e?.required&&(0,l.A)((JSON.stringify(t)||"").replace(/\s/g,"")))return{id:e?.id,val:"Pflichtfeld"};if(!(0,l.A)(e?.validation))for(let t=0;t<e?.validation?.length;t++){let n=e?.validation[t];if(!0!==(0,ey[n?.operator])(ei[e?.id],n?.value))return{id:e?.id,val:n?.errorMessage}}if(e?.type===m.Files&&!(0,l.A)(t)){let n=[];if(t.map((t,i)=>{let a=t.name.split("."),l=(a[a.length-1]||"").toLowerCase();e?.filetypes?.includes(l)?t.size>=e?.filesize&&(n[i]="Datei zu gro\xdf | Maximal erlaubt: "+(0,_.A)(e?.filesize,1024,["B","KB","MB","GB","TB","PB"])):n[i]="Nicht unterst\xfctztes Dateiformat | Folgende Formate sind erlaubt: "+e?.filetypes.join(", ")}),!(0,l.A)(n))return{id:e?.id,val:n}}},ev=e=>{let t=[];return e?.map(e=>{if(e?.type===m.GridContainer||e?.type===m.GridItem){if(!(0,l.A)(e.elements)){let n=ev(e.elements);(0,l.A)(n)||(t=[...t,...n])}}else if(e?.type===m.Check||e?.type===m.Files||e?.type===m.Location||e?.type===m.Radio||e?.type===m.Range||e?.type===m.Select||e?.type===m.Slider||e?.type===m.Date||e?.type===m.DateTime||e?.type===m.Mail||e?.type===m.Number||e?.type===m.Telefon||e?.type===m.Text||e?.type===m.TextArea||e?.type===m.Time){let n=e$(e);(0,l.A)(n)||t.push(n)}}),t},e_=async()=>{let e=ev(et);if(e.length>0)(0,j.A)(e,el,er);else if(!(0,l.A)(ei)){es(!0);let e=Object.assign([],ei?.files);delete ei.files;let n=ex?.length===1?ex?.[0]:ei?.standort,a=(0,l.A)(eg)?O.d?.find(e=>e?.name===ei?.anfrageart)?.id:eg,r=new URL(location.href);t?.cookies?.marketing===!0&&Object.values((0,b.Ri)(w.s$)||{}).map(e=>"object"==typeof e&&r.searchParams.set(e?.name,e?.value));let s={bcc:void 0,cc:void 0,formData:{...ei,referrerUrl:r.href,requestType:a?.toString(),standort:ed?.find(e=>e?.i===parseInt(ei?.standort))?.t},formId:"string"==typeof eb?.content?.form?parseInt(eb?.content?.form):eb?.content?.form,replyTo:[ei?.email||ei?.mail],subject:eb?.content?.title||"Anfrage",to:ef?[n]:eb?.content?.to?.replace(", ",",")?.split(",")};try{let n=await (0,$.J6)(s,e,null);if((0,o.A)("generate_lead_form",{cookieSettings:t?.cookies,currency:"EUR",event_origin:t?.isLanding===!0?"landingpage":"sr",event_source:"form",event_source_object:"site",form_name:`Formular: ${n?.name}`,referer:t?.refererUrl,url:t?.siteUrl,user_data:{address:{first_name:ei?.vorname,last_name:ei?.nachname||ei?.familienname||ei?.name},mail:ei?.email||ei?.mail,phone:ei?.phone||ei?.tel||ei?.telefon||ei?.mobil},value:0},w.A4,Z?.settings?.debug,{gtmPreviewKey:t?.gtmPreviewKey,trackingHash:Z?.trackingHash}),(0,C.A)(Z?.settings?.forms?.customScripts,"formCommonSuccess"),Z?.settings?.forms?.thankYouPage===!0){let e=[`origin=${encodeURIComponent(Q)}`,!(0,l.A)(n?.counter)?`ticket=${n?.counter}`:void 0].filter(e=>!(0,l.A)(e));Y(`/danke?${e?.join("&")}`)}else ec({status:"success",title:`Ihre Nachricht wurde versandt${!(0,l.A)(n?.counter)?` 2Ihre Ticketnummer: ${n?.counter}`:""}`}),es(!1),i=setTimeout(()=>{ec(void 0),clearTimeout(i)},1e4)}catch(e){console.error(e),ec({status:"error",title:"Ihre Nachricht konnte gerade nicht gesendet werden. Bitte versuchen Sie es sp\xe4ter erneut.",text:Z?.settings?.debug===!0?e?.message:void 0}),es(!1),i=setTimeout(()=>{ec(void 0),clearTimeout(i)},1e4)}}},ek=e=>{if((0,l.A)(e?.filterAnd)&&(0,l.A)(e?.filterOr))return!0;if(!(0,l.A)(e?.filterAnd)&&!(0,l.A)(e?.filterOr))return console.error("Es darf nur filterAnd ODER filterOr gew\xe4hlt werden!"),!0;if((0,l.A)(e?.filterAnd))if((0,l.A)(e?.filterOr))return console.error("No filter type found"),!1;else{let t=[];for(let n=0;n<e?.filterOr.length;n++){let i=e?.filterOr[n];if(!(0,l.A)(i)){let e=ey[i.operator];t.push(e(ei[i?.field],i.value))}}return t?.includes(!0)}{let t=[];for(let n=0;n<e?.filterAnd.length;n++){let i=e?.filterAnd[n];if(!(0,l.A)(i)){let e=ey[i.operator];t.push(e(ei[i?.field],i.value))}}return!t?.includes(!1)}},ej=(e,n)=>{let{id:i,label:r,type:o}=e,s=e=>(0,j.A)({id:i,val:e},ei,ea,el,er);if(!(0,l.A)(e)&&ek(e))if(o===m.GridContainer){let{alignItems:s,elements:d,justifyContent:m,spacing:u}=e;return(0,a.jsx)(P,{name:g,additionals:t,data:{style:{bgColor:"transparent",columns:{gap:u,justifyContent:m,alignItems:s||"flex-start"}}},embed:!0,children:!(0,l.A)(d)&&d?.map((e,t)=>ej(e,`${n}_${t}`))},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.GridItem){let{elements:s,lg:d,md:m,sm:u}=e;return(0,a.jsx)(M,{name:g,additionals:t,data:{style:{bgColor:"transparent",columns:{widthSm:u,widthMd:m,widthLg:d}}},embed:!0,children:!(0,l.A)(s)&&s.map((e,t)=>ej(e,`${n}_${t}`))},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Hidden)return(0,a.jsx)("input",{id:i,name:i,type:"hidden",value:e?.value},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`);else if(o===m.Infotext){let{content:l,style:s}=e;return(0,a.jsx)(K,{additionals:t,embed:!0,data:{content:{text:(l.startsWith("*")?"\\":"")+l},style:{fontWeight:s?.fontWeight,textColor:s?.textColor||ee?.vars?.palette?.text?.primary,textDecoration:s?.textDecoration,textDecorationColor:s?.textDecorationColor||s?.textColor||ee?.vars?.palette?.text?.primary}}},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Spacer){let{height:l}=e;return(0,a.jsx)(H,{additionals:t,embed:!0,data:{style:{height:l,heightMd:l,heightLg:l}}},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Mail||o===m.Number||o===m.Telefon||o===m.Text||o===m.TextArea){let{required:l,uppercase:d}=e;return(0,a.jsx)(U,{additionals:t,data:{content:{callback:o===m.Mail&&e?.useAsCC?e=>{(0,j.A)([{id:i,val:e},{id:"cc",val:e}],ei,ea,el,er)}:s,disabled:eo,error:el[i],id:i,label:r,required:l,uppercase:d,type:o,value:ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Date||o===m.DateTime||o===m.Time){let{required:l}=e;return(0,a.jsx)(z,{additionals:t,data:{content:{callback:s,disabled:eo,error:el[i],id:i,label:r,required:l,type:o,value:ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Location||o===m.Select){let{required:l}=e;return(0,a.jsx)(V,{additionals:t,data:{content:{callback:s,disabled:eo,error:el[i],id:i,label:r,options:o===m.Location?ed:e?.options.reduce((e,t)=>
2[...e,{i:t,t:t}],[]),required:l,value:ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Check){let{link:l,linkTooltip:d,required:m}=e;return(0,a.jsx)(N,{additionals:t,data:{content:{callback:s,disabled:eo,error:el[i],id:i,label:r,link:l,linkTooltip:d,required:m,value:ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Radio){let{options:l,required:d}=e;return(0,a.jsx)(J,{additionals:t,data:{content:{callback:s,disabled:eo,error:el[i],id:i,label:r,options:l,required:d,value:ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Files){let{filecount:t,filesize:d,filetypes:m,multiple:u=!1,required:c}=e,b=m?.reduce((e,t)=>{let n={...e},i=t?.startsWith(".")?t:`.${t}`,a=(0,p.lookup)(i);return a&&((0,l.A)(n?.[a])?n[a]=[i]:n?.[a]?.push(i)),n},{});return(0,a.jsxs)(E.MJ,{error:!(0,l.A)(el[i]),fullWidth:!0,children:[(0,a.jsx)(E.lR,{children:r+(c?" *":"")}),(0,a.jsx)(B._O,{accept:b,"aria-label":"Upload",disabled:!(0,l.A)(ei[i])&&ei[i].length>=t,error:!(0,l.A)(el[i]),files:ei[i],helperText:(0,a.jsx)(E.eK,{error:!(0,l.A)(el[i]),sx:{whiteSpace:"pre-wrap"},children:el[i]}),maxFiles:t,maxSizes:{images:d,others:d,videos:d},multiple:u,onDrop:e=>{let n=[...ei[i]||[]];n.push(...e?.map(e=>Object.assign(e,{preview:URL.createObjectURL(e)}))||[]),!(0,l.A)(t)&&n.length>t&&n.splice(t),s(n)},onRemove:e=>{let n=(ei[i]||[])?.filter(t=>t!==e);!(0,l.A)(t)&&n.length>t&&n.splice(t),s(n)},onRemoveAll:()=>{s([])}})]},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.Range||o===m.Slider){let{max:l,min:d,required:u,step:c}=e;return(0,a.jsx)(W,{additionals:t,data:{content:{callback:o===m.Range?e=>{(0,j.A)({id:i,val:Array.isArray(e)?e.join(" - "):e},ei,ea,el,er)}:s,disabled:eo,error:el[i],id:i,label:r,max:l,min:d,required:u,step:c,type:o,value:o===m.Range?(ei[i]?ei[i]:"").split(" - "):ei[i]}},embed:!0},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)}else if(o===m.ResetButton)return(0,a.jsx)(D,{additionals:t,embed:!0,id:i,data:{content:{text:r??"Zur\xfccksetzen"},style:{disabled:eo,fullWidth:!0,variant:"outlined",bgColor:"primary.main",overwriteClick:()=>{ea(eh(et)),er({})}}}},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`);else if(o===m.SubmitButton)return(0,a.jsx)(D,{additionals:t,embed:!0,id:i,data:{content:{text:r??"Absenden"},style:{bgColor:"primary.main",disabled:eo,fullWidth:!0,loading:eo,overwriteClick:e_}}},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`);else return(0,a.jsx)("span",{children:`Unbekannter Feldtyp: ${o}`},`form_${eb?.content?.id}_${o}_${i}_${r}_${n}`)},eC=(0,y.useCallback)(e=>ef?e?.filter(e=>{let t=e?.contactForms?.find(e=>e?.responsibility===eg);if((0,l.A)(eg)&&(0,l.A)(ex)||(0,l.A)(eg)&&ex?.includes(e?.value))return!0;if(eg===s.q2.enum.General&&(0,l.A)(ex))return!0;if(!(0,l.A)(t)&&(0,l.A)(ex))return!0;if(!(0,l.A)(t)&&ex?.includes(e?.value))return!0;else return!1})?.reduce((e,t)=>[...e,{cf:t.contactForms,i:t.value,t:t.label}],[]):e?.reduce((e,t)=>[...e,{i:t.value,t:t.label}],[])?.filter(e=>(0,l.A)(ex)||ex?.includes(e?.i)),[ef,eg,ex]),ew=(0,y.useCallback)(async()=>{if((0,r.A)(t?.marketing)){let e=await (0,v.b)(Z?.id),t=eC(e?.select);return em(t),t}{let e=eC(t?.marketing?.select);return em(e),e}},[eC]),eS=(0,y.useCallback)(async()=>{let e="string"==typeof eb?.content?.form?parseInt(eb?.content?.form):eb?.content?.form,n=t?.forms;if((0,r.A)(n)){let t,n=await (0,$.Rs)(e,["content"],{frontend:!1});!(0,l.A)(n?.content)&&(JSON.stringify(n?.content)?.includes('"type":"standort"')||ef)&&(t=await ew());let i=[];ef&&!(0,l.A)(n?.content)&&(i=eA(n?.content,t)),en(ef?i:n?.content)}else{let t,i=n?.find(t=>t?.id===e)?.content;!(0,l.A)(i)&&(JSON.stringify(i)?.includes('"type":"standort"')||ef)&&(t=await ew());let a=[];ef&&!(0,l.A)(i)&&(a=eA(i,t)),en(ef?a:i)}},[eA,ef,eb?.content?.form,ew]);(0,y.useEffect)(()=>{eS()},[eS]),(0,y.useEffect)(()=>{!(0,l.A)(et)&&(0,l.A)(ei)&&!(0,l.A)(ed)&&ea(eh(et))},[et,ei,eh,ed]);let eT=(0,a.jsx)("div",{"data-color-scheme":eb?.style?.useDarkMode?"dark":void 0,children:(0,a.jsx)(E.az,{sx:{...!eb?.content?.form||t?.isBackend&&(0,l.A)(et)?{display:"flex",alignItems:"center",justifyContent:"center",color:"#eee",background:"#333",borderRadius:7.2,boxShadow:"#4f4f4f2d 0px 2px 4px"}:{},margin:{xs:`${eb?.style?.box?.mobile?.margin?.top||0}${eb?.style?.box?.mobile?.margin?.unit||"px"} ${eb?.style?.box?.mobile?.margin?.right||0}${eb?.style?.box?.mobile?.margin?.unit||"px"} ${eb?.style?.box?.mobile?.margin?.bottom||0}${eb?.style?.box?.mobile?.margin?.unit||"px"} ${eb?.style?.box?.mobile?.margin?.left||0}${eb?.style?.box?.mobile?.margin?.unit||"px"}`,sm:`${eb?.style?.box?.tablet?.margin?.top||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.right||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.bottom||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.left||0}${eb?.style?.box?.tablet?.margin?.unit||"px"}`,md:`${eb?.style?.box?.tablet?.margin?.top||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.right||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.bottom||0}${eb?.style?.box?.tablet?.margin?.unit||"px"} ${eb?.style?.box?.tablet?.margin?.left||0}${eb?.style?.box?.tablet?.margin?.unit||"px"}`,lg:`${eb?.style?.box?.desktop?.margin?.top||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.right||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.bottom||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.left||0}${eb?.style?.box?.desktop?.margin?.unit||"px"}`,xl:`${eb?.style?.box?.desktop?.margin?.top||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.right||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.bottom||0}${eb?.style?.box?.desktop?.margin?.unit||"px"} ${eb?.style?.box?.desktop?.margin?.left||0}${eb?.style?.box?.desktop?.margin?.unit||"px"}`},padding:{xs:`${eb?.style?.box?.mobile?.padding?.top||0}${eb?.style?.box?.mobile?.padding?.unit||"px"} ${eb?.style?.box?.mobile?.padding?.right||0}${eb?.style?.box?.mobile?.padding?.unit||"px"} ${eb?.style?.box?.mobile?.padding?.bottom||0}${eb?.style?.box?.mobile?.padding?.unit||"px"} ${eb?.style?.box?.mobile?.padding?.left||0}${eb?.style?.box?.mobile?.padding?.unit||"px"}`,sm:`${eb?.style?.box?.tablet?.padding?.top||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.right||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.bottom||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.left||0}${eb?.style?.box?.tablet?.padding?.unit||"px"}`,md:`${eb?.style?.box?.tablet?.padding?.top||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.right||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.bottom||0}${eb?.style?.box?.tablet?.padding?.unit||"px"} ${eb?.style?.box?.tablet?.padding?.left||0}${eb?.style?.box?.tablet?.padding?.unit||"px"}`,lg:`${eb?.style?.box?.desktop?.padding?.top||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.right||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.bottom||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.left||0}${eb?.style?.box?.desktop?.padding?.unit||"px"}`,xl:`${eb?.style?.box?.desktop?.padding?.top||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.right||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.bottom||0}${eb?.style?.box?.desktop?.padding?.unit||"px"} ${eb?.style?.box?.desktop?.padding?.left||0}${eb?.style?.box?.desktop?.padding?.unit||"px"}`}},children:eb?.content?.form?t?.isBackend&&(0,l.A)(et)?"[Formular nicht gefunden]":(0,a.jsxs)(a.Fragment,{children:[eb?.content?.form&&!(0,l.A)(et)&&[...et].map((e,t)=>ej(e,t.toString())),eb?.content?.form&&!(0,l.A)(eu)&&(0,a.jsxs)(E.Fc,{style:{marginTop:16},severity:eu.status,children:[(0,a.jsx)("p",{style:{fontWeight:700,marginBottom:5},children:eu.title}),eu.text]})]}):"[Formular]"})});return!t?.isBackend||n||t?.isFooter?eT:(0,a.jsx)(L,{customActions:[X],index:f||0,focusRing:{offset:0},children:eT})}},16768:(e,t,n)=>{n.d(t,{A:()=>f,d:()=>p});var i=n(37876),a=n(29911),l=n(40219),r=n(90566),o=n(88992),s=n(63328),d=n(73094),m=n(76679),u=n(46662),c=n(22601);let p=[{id:l.q2.enum.General,name:r.default.settings.formRequestTypeGeneral},{id:l.q2.enum.Service,name:r.default.settings.formRequestTypeService},{id:l.q2.enum.Vehicle,name:r.default.settings.formRequestTypeVehicle},{id:l.q2.enum.PartsEquipment,name:r.default.settings.formRequestTypePartsEquipment},{id:l.q2.enum.TestDrive,name:r.default.settings.formRequestTypeTestDrive},{id:l.q2.enum.Renting,name:r.default.settings.formRequestTypeRenting},{id:l.q2.enum.TradeIn,name:r.default.settings.formRequestTypeTradeIn},{id:l.q2.enum.Application,name:r.default.settings.formRequestTypeApplication},{id:l.q2.enum.OnlineShop,name:r.default.settings.formRequestTypeOnlineShop},{id:l.q2.enum.OnlineSales,name:r.default.settings.formRequestTypeOnlineSales},{id:l.q2.enum.Event,name:r.default.settings.formRequestTypeEvent},{id:l.q2.enum.Campaigns,name:r.default.settings.formRequestTypeCampaigns},{id:l.q2.enum.CashBack,name:r.default.settings.formRequestTypeCashBack}].sort((e,t)=>
2e?.name?.toLowerCase()?.localeCompare(t?.name?.toLowerCase())),b=[{id:"type",label:"common:components.contactCard.type"},{id:"responsibility",label:"common:components.contactCard.requestType",align:"left"},{id:"value",label:"common:components.contactCard.value",align:"left"},{id:"",label:"",align:"center"}];function f({methods:e}){let{control:t}=e,{translate:n}=(0,s.A)(),r=[{label:n(`common:components.contactCard.types.${l.SE.enum.Mail}`),value:l.SE.enum.Mail}],g=(e,t,n,i,a)=>{let r=Object.assign([],t),o=Object.assign({},r[n]);"responsibility"===i&&"number"==typeof a&&(o.responsibility=a),"type"===i&&"number"==typeof a&&(o.type=a,o.type===l.SE.enum.Mail||o.type===l.SE.enum.FleetMail?o.value="[email protected]":o.value="+49 1234 567890"),"value"===i&&"string"==typeof a&&(o.value=a),r[n]=o,e.onChange(r)},x=(e,t,n)=>{let i=Object.assign([],t);n>-1&&i.splice(n,1),e.onChange(i)};return(0,i.jsx)(o.xI,{name:"contactForms",control:t,render:({field:e,fieldState:{error:t}})=>(0,i.jsxs)(m.BJ,{component:m.Zp,children:[(0,i.jsxs)(m.BJ,{spacing:2,alignItems:"flex-start",direction:"row",sx:{p:3,justifyContent:"space-between"},children:[(0,i.jsx)(m.o5,{variant:"overline",sx:{flexGrow:1,color:"text.secondary"},children:n("common:locations.fieldContactForms")}),(0,i.jsx)(m.$n,{"data-testid":"ContactCard_btnAddContact",variant:"contained",size:"small",startIcon:(0,i.jsx)(d.default,{icon:"eva:plus-fill"}),onClick:()=>{let t=Object.assign([],e?.value);t.push({responsibility:l.q2.enum.General,type:l.SE.enum.Mail,value:"[email protected]"}),e?.onChange(t)},sx:{width:"fit-content"},children:n("common:components.contactCard.addContact")})]}),(0,i.jsx)(m.K3,{sx:{position:"relative",overflow:"unset",pb:2},children:(0,i.jsx)(u.A,{children:(0,i.jsxs)(m.XI,{size:"medium",children:[(0,i.jsx)(c.er,{headLabel:b,rowCount:Object.keys(e?.value||{})?.length}),(0,i.jsx)(m.BF,{children:e?.value?.map((l,o)=>(0,i.jsxs)(m.Hj,{hover:!0,children:[(0,i.jsx)(m.nA,{sx:{minWidth:{xs:150,md:200,xl:150}},children:(0,i.jsx)(m.jT,{disableClearable:!0,onChange:(t,n)=>g(e,e?.value,o,"type",n?.value),options:r,isOptionEqualToValue:(e,t)=>e?.value===t?.value,renderInput:e=>(0,i.jsx)(m.A_,{label:n("common:components.contactCard.type"),error:!(0,a.A)(t?.[o]?.type),helperText:(0,a.A)(t?.[o]?.type)?void 0:"string"==typeof t?.[o]?.type?.message?t?.[o]?.type?.message:t?.[o]?.type?.message?.message,...e}),value:r?.find(e=>e?.value===l?.type?.valueOf())})}),(0,i.jsx)(m.nA,{sx:{minWidth:{xs:250}},children:(0,i.jsx)(m.jT,{disableClearable:!0,getOptionKey:e=>e?.id,getOptionLabel:e=>e?.name||"",isOptionEqualToValue:(e,t)=>e?.id===t?.id,onChange:(t,n)=>g(e,e?.value,o,"responsibility",n?.id),options:p,renderInput:e=>(0,i.jsx)(m.A_,{inputProps:{"data-testid":"DepartmentNewEditForm_autocompleteResponsibility"},label:n("common:components.contactCard.requestType"),error:!(0,a.A)(t?.[o]?.type),helperText:(0,a.A)(t?.[o]?.type)?void 0:"string"==typeof t?.[o]?.type?.message?t?.[o]?.type?.message:t?.[o]?.type?.message?.message,...e}),value:p?.find(e=>e?.id===l?.responsibility)||void 0})}),(0,i.jsx)(m.nA,{sx:{minWidth:{xs:250}},children:(0,i.jsx)(m.A_,{fullWidth:!0,error:!(0,a.A)(t?.[o]?.value),helperText:(0,a.A)(t?.[o]?.value)?void 0:"string"==typeof t?.[o]?.value?.message?t?.[o]?.value?.message:t?.[o]?.value?.message?.message,inputProps:{"data-testid":"ContactRow_value"},label:n("common:components.contactCard.value"),value:l?.value,onChange:t=>g(e,e?.value,o,"value",t?.target?.value)},`contact_value_${o}`)}),(0,i.jsx)(m.nA,{children:(0,i.jsx)(m.K0,{"data-testid":"RedirectRow_btnDelete",size:"small",color:"primary",onClick:()=>x(e,e?.value,o),children:(0,i.jsx)(m.m_,{title:n("common:components.contactCard.deleteContact"),children:(0,i.jsx)(d.default,{icon:"material-symbols:delete-outline-rounded"})})})})]},`contact_row_${o}`))})]})})})]})})}},23735:(e,t,n)=>{n.d(t,{b:()=>r});var i=n(32078),a=n(23787),l=n(42299);async function r(e,t){let n;return await (0,i.A)("Axios","Marketing","getMarketing","Abrufen des Marketing-Hubs",async()=>{n=(await (0,a.Ay)({title:"Abrufen des Marketing-Hubs",method:"post",url:`${l.B9}/marketing`,data:{single:!0},headers:(0,a._b)({customIdProject:e})}))?.data},{disableSuccess:!0,disableLoading:t}),n}},39751:(e,t,n)=>{n.d(t,{Q:()=>i});let i=(0,n(14232).createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"})}
2,46812:(e,t,n)=>{n.d(t,{DG:()=>m,J6:()=>p,Rs:()=>d,YD:()=>b,Zu:()=>s,i6:()=>c,wi:()=>u});var i=n(29911),a=n(32078),l=n(33656),r=n(23787),o=n(42299);async function s(e,t,n,i,l,s,d,m){let u={filters:e,single:!1,viewOptions:{...s,additionalAllCounts:n,cols:t,..."all"===i?{}:{...i},sortBy:l}},c={additionalAllCounts:{},allCount:0,forms:[]};return await (0,a.A)("Axios","Forms","getFormList","Abrufen der Formulare",async()=>{c=(await (0,r.Ay)({title:"Abrufen der Formulare",method:"post",url:`${o.B9}/forms`,data:u,headers:(0,r._b)({}),signal:d}))?.data||{additionalAllCounts:{},allCount:0,forms:[]}},{disableSuccess:!0,disableLoading:m}),c}async function d(e,t,n,i,l){let s,d={filters:{id:e},single:!0,viewOptions:{...n,cols:t}};return await (0,a.A)("Axios","Forms","getForm","Abrufen der Formulare",async()=>{s=(await (0,r.Ay)({title:"Abrufen der Formulare",method:"post",url:`${o.B9}/forms`,data:d,headers:(0,r._b)({}),signal:i}))?.data},{disableSuccess:!0,disableLoading:l}),s}async function m(e){let t;return await (0,a.A)("Axios","Forms","createForm","Erstellen des Formulars",async()=>{t=(await (0,r.Ay)({title:"Erstellen des Formulars",method:"put",url:`${o.B9}/forms`,data:e,headers:(0,r._b)({})}))?.data}),t}async function u(e){let t;return await (0,a.A)("Axios","Forms","updateForm","Bearbeiten des Formulars",async()=>{t=(await (0,r.Ay)({title:"Bearbeiten des Formulars",method:"patch",url:`${o.B9}/forms`,data:e,headers:(0,r._b)({})}))?.data}),t}async function c(e){return await (0,a.A)("Axios","Forms","deleteForm","L\xf6schen des Formulars",async()=>{await (0,r.Ay)({title:"L\xf6schen des Formulars",method:"delete",url:`${o.B9}/forms`,data:e,headers:(0,r._b)({})})})}async function p(e,t,n){let s,d=new Date,m=new FormData;if((0,i.A)(e?.bcc)||m?.append("bcc",JSON.stringify(e?.bcc)),(0,i.A)(e?.cc)||m?.append("cc",JSON.stringify(e?.cc)),(0,i.A)(e?.formData)||m?.append("formData",JSON.stringify(e?.formData)),(0,i.A)(e?.formId)||m?.append("formId",e?.formId?.toString()),(0,i.A)(e?.replyTo)||m?.append("replyTo",JSON.stringify(e?.replyTo)),(0,i.A)(e?.subject)||m?.append("subject",e?.subject),(0,i.A)(e?.to)||m?.append("to",JSON.stringify(e?.to)),t?.map(e=>m?.append("attachments",e)),!await (0,a.A)("Axios","Forms","sendForm","Absenden des Formulars",async()=>{s=(await (0,r.Ay)({title:"Absenden des Formulars",method:"post",url:`${o.B9}/forms/send`,data:m,headers:(0,r._b)({}),onUploadProgress:e=>(0,l.A)(e,d,n)}))?.data}))throw Error("Das Formular konnte nicht gesendet werden.");return s}async function b(e){let t;return await (0,a.A)("Axios","Forms","duplicateForm","Duplizieren des Formulars",async()=>{t=(await (0,r.Ay)({title:"Duplizieren des Formulars",method:"post",url:`${o.B9}/forms/duplicate`,data:e,headers:(0,r._b)({})}))?.data}),t}},68906:(e,t,n)=>{n.d(t,{A:()=>i.A});var i=n(8686)},73518:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{A:()=>doCustomScripts});var _autohaus_digital_shared_tools_is_undefined_null_or_empty__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(29911);function doCustomScripts(customScriptsSettings,customScriptsKey){if(!(0,_autohaus_digital_shared_tools_is_undefined_null_or_empty__WEBPACK_IMPORTED_MODULE_0__.A)(customScriptsSettings?.[customScriptsKey]))try{eval(customScriptsSettings?.[customScriptsKey])}catch(err){console.error("eval failed:",err)}}},74073:(e,t,n)=>{n.d(t,{s:()=>i});function i(e){return[...new Set(e)]}},74468:(e,t,n)=>{n.d(t,{A:()=>r,P:()=>l});var i=n(98885),a=n(85);function l(e){return(0,a.Ay)("MuiInputAdornment",e)}let r=(0,i.A)("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"])},74896:(e,t,n)=>{n.d(t,{E:()=>a});var i=n(14232);let a="u">typeof window?i.useLayoutEffect:i.useEffect},91200:(e,t,n)=>{n.d(t,{M:()=>a});var i=n(14232);function a(e){let t=(0,i.useRef)(null);return null===t.current&&(t.current=e()),t.current}},97312:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(62319),a=n(7927);function l(e,t={},n=null,r={},o=null){if((0,a.A)(e)||(0,a.A)(n))return null;let s=Object.assign({},t),d=Object.assign({},r);if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t].container?((0,a.A)(s[e[t].container])&&(s[e[t].container]={}),s[e[t].container][e[t].id]=e[t].val,(0,i.A)(d[e[t].container])||(0,i.A)(d[e[t].container][e[t].id])||delete d[e[t].container][e[t].id]):(s[e[t].id]=e[t].val,(0,i.A)(d[e[t].id])||delete d[e[t].id]);else e.container?((0,a.A)(s[e.container])&&(s[e.container]={}),s[e.container][e.id]=e.val,(0,i.A)(d[e.container])||(0,i.A)(d[e.container][e.id])||delete d[e.container][e.id]):(s[e.
2id]=e.val,(0,i.A)(d[e.id])||delete d[e.id]);n(s),(0,a.A)(o)||o(d)}}}]); 3//# chunkId=cd8e6a65-aba2-5ea6-9414-ae9d00cbc55a
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.