PageSourceSearch

https://elektro-beta.vercel.app/_next/static/chunks/1620-770264979…?dpl=dpl_D1hn2bMsHtoSzrGNzfiJWmaHV292

js elektro-beta.vercel.app collected 2026-10-03 06:52:12 UTC 10,417 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1620],{826:(e,t,a)=>{a.d(t,{$g:()=>o,Bm:()=>d,XH:()=>c,cn:()=>i,rH:()=>s,y:()=>l});var r=a(2902),n=a(3714);function i(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,n.QP)((0,r.$)(t))}function l(e){return Math.round(e).toString()}function s(e){return e>=80?"Exzellent":e>=65?"Gut":e>=50?"Mittel":e>=35?"Schwach":"Kritisch"}function o(e){return new Intl.NumberFormat("de-AT",{style:"currency",currency:"EUR",maximumFractionDigits:0}).format(e)}function c(e){return e>=75?"bg-green-500":e>=55?"bg-amber-400":"bg-rose-400"}function d(e){return e>=75?"text-green-700":e>=55?"text-amber-700":"text-rose-700"}},1064:(e,t,a)=>{a.d(t,{M:()=>s});var r=a(4568),n=a(826);let i={sm:{outer:"h-8  w-8  text-xs  font-bold",vb:22,sw:2.5,r:9},md:{outer:"h-11 w-11 text-sm  font-bold",vb:32,sw:2.5,r:13},lg:{outer:"h-14 w-14 text-base font-extrabold",vb:40,sw:3,r:16},xl:{outer:"h-20 w-20 text-2xl font-extrabold",vb:56,sw:3.5,r:22}};function l(e){return e>=80?"text-green-700":e>=65?"text-lime-700":e>=50?"text-yellow-800":e>=35?"text-orange-700":"text-red-700"}function s(e){let{score:t,size:a="md",showLabel:s,className:o,showTooltip:c}=e,{outer:d,vb:u,sw:h,r:m}=i[a],x=u/2,b=2*Math.PI*m,g=t/100*b,p=(0,n.rH)(t),f=c?"Nachhaltigkeitsscore: ".concat((0,n.y)(t),"/100 (").concat(p,"). Aus 7 Dimensionen berechnet — siehe Methodik."):void 0;return(0,r.jsxs)("div",{className:(0,n.cn)("flex flex-col items-center gap-1",o),title:f,children:[(0,r.jsxs)("div",{className:(0,n.cn)("relative flex items-center justify-center",d),role:"img","aria-label":"Nachhaltigkeitsscore: ".concat((0,n.y)(t)," von 100 — ").concat(p),children:[(0,r.jsxs)("svg",{className:"absolute inset-0 w-full h-full -rotate-90",viewBox:"0 0 ".concat(u," ").concat(u),"aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:x,cy:x,r:m,fill:"none",stroke:"#f1f5f9",strokeWidth:h}),(0,r.jsx)("circle",{cx:x,cy:x,r:m,fill:"none",stroke:t>=80?"#22c55e":t>=65?"#84cc16":t>=50?"#eab308":t>=35?"#f97316":"#ef4444",strokeWidth:h,strokeLinecap:"round",strokeDasharray:"".concat(g," ").concat(b-g),className:"score-ring-progress",style:{"--ring-dash":"".concat(g)}})]}),(0,r.jsx)("span",{className:(0,n.cn)("relative z-10 tabular-nums",l(t)),"aria-hidden":"true",children:(0,n.y)(t)})]}),s&&(0,r.jsx)("span",{className:(0,n.cn)("text-[11px] font-semibold",l(t)),"aria-hidden":"true",children:p})]})}},1620:(e,t,a)=>{a.d(t,{QuizWidget:()=>N});var r=a(4568),n=a(7620),i=a(9664),l=a.n(i),s=a(9797),o=a(6328),c=a(1444),d=a(8799),u=a(2051),h=a(2086),m=a(1194),x=a(1979),b=a(2303),g=a(159),p=a(4470),f=a(8917),v=a(826),w=a(1064);let j=[{id:"km",text:"Wie viele Kilometer f\xe4hrst du durchschnittlich pro Tag?",icon:(0,r.jsx)(s.A,{className:"h-6 w-6"}),options:[{value:"low",label:"Bis 50 km",points:30},{value:"mid",label:"50–150 km",points:25},{value:"high",label:"150–300 km",points:15},{value:"vhigh",label:"\xdcber 300 km",points:5}]},{id:"charging",text:"Wo w\xfcrdest du haupts\xe4chlich laden?",icon:(0,r.jsx)(o.A,{className:"h-6 w-6"}),options:[{value:"home",label:"Zu Hause (Garage/Wallbox)",points:30},{value:"work",label:"Bei der Arbeit (Ladestation)",points:25},{value:"public",label:"\xd6ffentliche Ladepunkte",points:15},{value:"none",label:"Kein fixer Ladepunkt",points:5}]},{id:"budget",text:"Was ist dein Budget f\xfcr ein neues Fahrzeug?",icon:(0,r.jsx)(c.A,{className:"h-6 w-6"}),options:[{value:"low",label:"Bis € 30.000",points:20},{value:"mid",label:"€ 30.000–50.000",points:25},{value:"high",label:"€ 50.000–80.000",points:25},{value:"vhigh",label:"\xdcber € 80.000",points:20}]},{id:"concern",text:"Was ist deine gr\xf6\xdfte Sorge beim Umstieg auf Elektro?",icon:(0,r.jsx)(d.A,{className:"h-6 w-6"}),options:[{value:"range",label:"Reichweite zu gering",points:10},{value:"charge",label:"Ladeinfrastruktur unzureichend",points:10},{value:"cost",label:"Anschaffungskosten zu hoch",points:15},{value:"none",label:"Eigentlich keine",points:30}]},{id:"usage",text:"F\xfcr welchen Hauptzweck nutzt du dein Auto?",icon:(0,r.jsx)(u.A,{className:"h-6 w-6"}),options:[{value:"commute",label:"Pendeln zur Arbeit",points:30},{value:"family",label:"Familie & Alltagseink\xe4ufe",points:25},{value:"travel",label:"Lange Reisen & Urlaub",points:15},{value:"business",label:"Gesch\xe4ftsreisen",points:15}]}],k=[{min:90,title:"Perfekt bereit!",icon:o.A,description:"Dein Fahrprofil ist wie gemacht f\xfcr Elektromobilit\xe4t. Du wirst von den niedrigen Betriebskosten, dem ruhigen Fahren und dem Umweltvorteil begeistert sein.",color:"text-emerald-700",iconColor:"text-emerald-600 bg-emerald-100",bgColor:"bg-emerald-50 border-emerald-200",cta:"Passende E-Autos ansehen",ctaHref:"/marktplatz/evs"},{min:65,title:"Sehr gut geeignet",icon:h.A,description:"Mit kleinen Anpassungen — zum Beispiel einer Wallbox zu Hause — ist Elektro f\xfcr dich die ideale Wahl. Der Kostenvergleich wird dich \xfcberzeugen.",color:"text-green-700",iconColor:"text-green-600 bg-green-100",bgColor:"bg-green-50 border-green-200",cta:"Kostenvergleich starten",ctaHref:"/marktplatz/compare"}
1,{min:40,title:"Gut m\xf6glich",icon:m.A,description:"Elektro kann f\xfcr dich funktionieren — pr\xfcfe die Reichweite der Modelle genau und kl\xe4re ab, wo du regelm\xe4\xdfig laden kannst.",color:"text-yellow-700",iconColor:"text-yellow-600 bg-yellow-100",bgColor:"bg-yellow-50 border-yellow-200",cta:"Reichweiten vergleichen",ctaHref:"/marktplatz/evs"},{min:0,title:"Noch ein paar H\xfcrden",icon:x.A,description:"F\xfcr dein aktuelles Nutzungsprofil gibt es noch offene Fragen. Schau dir unsere Kostenkalkulation an — die Zahlen \xfcberraschen oft.",color:"text-orange-700",iconColor:"text-orange-600 bg-orange-100",bgColor:"bg-orange-50 border-orange-200",cta:"Trotzdem ansehen",ctaHref:"/marktplatz/evs"}];function N(){var e;let[t,i]=(0,n.useState)(0),[s,o]=(0,n.useState)({}),[c,d]=(0,n.useState)(!1),u=j[t],h=j.length,m=(t+1)/h*100;async function x(e,t){try{let{createClient:r}=await Promise.all([a.e(5385),a.e(2269),a.e(8371)]).then(a.bind(a,8371)),n=r(),{data:{user:i}}=await n.auth.getUser();if(!i)return;await n.from("profiles").update({quiz_result:{score:e,answers:t,completed_at:new Date().toISOString()}}).eq("id",i.id)}catch(e){}}let N=Math.round(Object.values(s).reduce((e,t)=>e+t.points,0)/j.reduce((e,t)=>e+Math.max(...t.options.map(e=>e.points)),0)*100),y=null!=(e=k.find(e=>N>=e.min))?e:k[k.length-1];return c?(0,r.jsxs)("div",{role:"status",className:(0,v.cn)("rounded-3xl border p-5 sm:p-8 shadow-sm",y.bgColor),children:[(0,r.jsxs)("div",{className:"text-center mb-6",children:[(0,r.jsx)("div",{className:(0,v.cn)("mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-2xl",y.iconColor),"aria-hidden":"true",children:(0,r.jsx)(y.icon,{className:"h-8 w-8",strokeWidth:1.5})}),(0,r.jsx)("h2",{className:(0,v.cn)("text-3xl font-extrabold mb-3",y.color),children:y.title}),(0,r.jsx)("div",{className:"mx-auto mb-4 flex items-center justify-center",children:(0,r.jsx)(w.M,{score:N,size:"xl",showLabel:!0})}),(0,r.jsx)("p",{className:"text-gray-600 max-w-md mx-auto leading-relaxed",children:y.description})]}),(0,r.jsx)("div",{className:"mb-6 rounded-2xl bg-white/70 p-5 space-y-2",children:j.map(e=>{var t;let a=s[e.id],n=e.options.find(e=>e.value===(null==a?void 0:a.value));return(0,r.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,r.jsx)("span",{className:"text-gray-500 truncate mr-2",children:e.text.replace("?","")}),(0,r.jsx)("span",{className:"font-medium text-gray-800 shrink-0",children:null!=(t=null==n?void 0:n.label)?t:"–"})]},e.id)})}),(0,r.jsxs)("div",{className:"flex flex-col gap-3 sm:flex-row",children:[(0,r.jsxs)(l(),{href:y.ctaHref,className:"btn-primary flex flex-1 items-center justify-center gap-2",children:[y.cta,(0,r.jsx)(f.A,{className:"h-4 w-4"})]}),(0,r.jsx)("button",{onClick:()=>{i(0),o({}),d(!1)},className:"btn-secondary flex-1",children:"Nochmal starten"})]})]}):(0,r.jsxs)("div",{className:"rounded-3xl border border-gray-200 bg-white p-5 sm:p-8 shadow-sm",children:[(0,r.jsxs)("div",{className:"mb-8",children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center justify-between text-xs text-ink-tertiary","aria-hidden":"true",children:[(0,r.jsxs)("span",{children:["Frage ",t+1," von ",h]}),(0,r.jsxs)("span",{children:[Math.round(m),"%"]})]}),(0,r.jsx)("div",{role:"progressbar","aria-valuenow":t+1,"aria-valuemin":1,"aria-valuemax":h,"aria-label":"Frage ".concat(t+1," von ").concat(h),className:"h-1.5 w-full rounded-full bg-gray-100",children:(0,r.jsx)("div",{className:"h-full rounded-full bg-brand-500 transition-all duration-500",style:{width:"".concat(m,"%")},"aria-hidden":"true"})})]}),(0,r.jsxs)("div",{"aria-live":"polite","aria-atomic":"true",className:"mb-8 flex items-start gap-4",children:[(0,r.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-2xl bg-brand-50 text-brand-600","aria-hidden":"true",children:u.icon}),(0,r.jsx)("h2",{className:"text-xl font-bold text-gray-900 leading-snug pt-1.5",children:u.text})]}),(0,r.jsx)("div",{className:"space-y-3",role:"group","aria-label":u.text,children:u.options.map(e=>{var a;let n=(null==(a=s[u.id])?void 0:a.value)===e.value;return(0,r.jsx)("button",{onClick:()=>(function(e,a){let r={...s,[u.id]:{value:e,points:a}};(o(r),t<h-1)?setTimeout(()=>i(e=>e+1),180):(x(Math.round(Object.values(r).reduce((e,t)=>
1e+t.points,0)/j.reduce((e,t)=>e+Math.max(...t.options.map(e=>e.points)),0)*100),r),setTimeout(()=>d(!0),180))})(e.value,e.points),"aria-pressed":n,className:(0,v.cn)("group w-full rounded-2xl border px-5 py-4 text-left text-sm font-medium transition-all duration-150",n?"border-brand-400 bg-brand-50 text-brand-800 shadow-sm":"border-gray-200 bg-white text-gray-700 hover:border-brand-300 hover:bg-brand-50/50"),children:(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("span",{children:e.label}),n?(0,r.jsx)(b.A,{className:"h-5 w-5 text-brand-600","aria-hidden":"true"}):(0,r.jsx)(g.A,{className:"h-4 w-4 text-gray-300 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"})]})},e.value)})}),t>0&&(0,r.jsxs)("button",{onClick:()=>i(e=>e-1),className:"mt-6 flex items-center gap-1.5 text-sm text-ink-tertiary hover:text-gray-600",children:[(0,r.jsx)(p.A,{className:"h-4 w-4","aria-hidden":"true"})," Zur\xfcck"]})]})}}}]);

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.