Der KlimaCorner-Planer wird geladen. Falls dieser Hinweis stehen bleibt,
bitte die Shop-Vorschauseite öffnen und JavaScript aktivieren.
(function () {
'use strict';
// SERVERANBINDUNG: erst nach Einrichtung befüllen, z. B. '/klimaplaner-api'.
// Leer = Eingabemaske nutzbar, Versand und Ergebnisfreischaltung gesperrt.
const CONFIG = { API_BASE: '' };
const STYLE = ":host{display:block;color:#333;background:#f8f8f8;color-scheme:light}.kc{font:16px/1.6 Arial,Helvetica,sans-serif;color:#333}*{box-sizing:border-box}a{color:#19598f;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:not-allowed}:focus-visible{outline:3px solid #1a598f;outline-offset:3px}header{display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid #ddd;padding:22px max(24px,calc((100% - 1190px)/2))}.brand{font-size:29px;font-weight:700;color:#1a598f;line-height:1.2}.brand small{display:block;font-size:10px;letter-spacing:2px;margin-top:6px}.phone{font-size:14px;font-weight:600}.shell{max-width:1240px;margin:auto;padding:36px 24px 0}.eyebrow{color:#1a598f;letter-spacing:1.6px;font-size:12px;font-weight:700;margin:0 0 10px}h1{font-size:40px;letter-spacing:-1px;line-height:1.2;margin:0 0 12px;color:#1a598f}h1 span{font-weight:400;color:#555}.intro\x3ep:last-child{color:#666;margin:0}.steps{display:flex;list-style:none;padding:0;margin:30px 0 24px}.steps li{display:flex;align-items:center;gap:10px;flex:1;font-size:14px;color:#666;border-bottom:2px solid #ddd;padding-bottom:16px}.steps li span{display:grid;place-items:center;border:1px solid #ddd;border-radius:50%;width:28px;height:28px;background:#fff;font-size:12px}.steps li.current,.steps li.done{border-color:#1a598f;color:#1a598f}.steps li.current span{background:#19598f;color:#fff;border-color:#19598f}.workspace{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start}.panel{background:#fff;border:1px solid #ddd;border-radius:10px;padding:30px;min-width:0}.section-heading{display:flex;gap:14px;margin-bottom:26px}.section-heading\x3espan{background:#edf3f8;border-radius:6px;color:#1a598f;padding:6px 10px;align-self:flex-start;font-size:14px}.section-heading h2{font-size:25px;line-height:1.3;margin:0 0 6px;color:#1a598f}.section-heading p{font-size:14px;color:#666;margin:0}fieldset{border:0;padding:0;margin:0 0 24px;min-width:0}legend{font-weight:600;margin:0 0 12px;padding:0}.cards{display:grid;grid-template-columns:1fr 1fr;gap:16px}.choice{display:block;position:relative;border:1px solid #ddd;border-radius:8px;padding:24px 20px;cursor:pointer}.choice.selected{border:2px solid #19598f;background:#f3f7fb;padding:23px 19px}.choice input{position:absolute;right:18px;top:20px;accent-color:#19598f}.choice strong{display:block;font-size:23px;color:#1a598f;padding:28px 0 6px}.choice p{font-size:14px;color:#555;margin:0}.choice.compact{padding:16px 20px}.choice.compact.selected{padding:15px 19px}.info{background:#eef4f9;border-radius:6px;padding:16px;font-size:14px;color:#3e5c74;margin:24px 0}.actions{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin-top:26px;padding-top:22px;border-top:1px solid #ebebeb}.actions small{color:#666;font-size:13px}.primary{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:6px;padding:13px 20px;background:#19598f;color:#fff;font-size:14px;font-weight:600;min-height:48px}.primary:hover{background:#19597b}.back{border:0;background:none;padding:10px 0;color:#19598f;font-size:14px}aside{background:#1a598f;color:#fff;border-radius:10px;padding:26px;position:sticky;top:24px}aside .eyebrow{color:#fff;font-size:11px}aside h2{font-size:24px;line-height:1.4;font-weight:400;margin:24px 0}aside dl\x3ediv{display:flex;justify-content:space-between;border-bottom:1px solid #ffffff35;padding:12px 0;font-size:14px}aside dd{margin:0;font-weight:600}aside .locked{background:#ffffff12;border:1px dashed #ffffff70;border-radius:6px;padding:14px;font-size:13px;margin:24px 0}aside ul{padding-left:20px;font-size:14px}aside li{margin:9px 0}aside\x3ea{display:block;color:#fff;font-size:14px;border-top:1px solid #ffffff40;padding-top:20px;margin-top:22px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:flex;flex-direction:column;gap:7px;min-width:0}.field span{font-size:14px;font-weight:600}.field input,.field select,.field textarea{width:100%;min-width:0;min-height:46px;border:1px solid #b3b3b3;border-radius:5px;background:#fff;padding:10px 12px;color:#333}.field textarea{height:90px;resize:vertical}.full{grid-column:1/-1}.check{display:flex;gap:10px;align-items:center;font-size:14px}.check input{accent-color:#19598f;width:18px;height:18px;flex-shrink:0}.consent{align-items:flex-start;margin-top:24px}.consent input{margin-top:5px}.consent a{text-decoration:underline}.trap{position:absolute;left:-99999px}.room-nav{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:24px}.room-nav button{border:1px solid #ddd;background:#f8f8f8;color:#333;padding:9px 12px;border-radius:5px;font-size:14px;max-width:100%;overflow-wrap:anywhere}.room-nav button.active{background:#19598f;color:#fff;border-color:#19598f}h3{font-size:17px;color:#1a598f;margin:28px 0 16px;padding-top:18px;border-top:1px solid #ebebeb}.hint{font-size:13px;color:#666;line-height:1.65}.notice{padding:16px;background:#eef4f9;border:1px solid #b6cfe3;border-radius:5px;font-size:14px;color:#19598f}.error{padding:16px;border:1px solid #ae3340;color:#922331;border-radius:5px;font-size:14px;background:#fff7f8}.message{padding:20px 0}.message h2{font-size:28px;color:#1a598f}.message p{overflow-wrap:anywhere}.total{padding:24px;background:#edf4fa;border-radius:8px;color:#1a598f}.total\x3estrong{display:block;font-size:50px;line-height:1.35}.total small{font-size:24px}.total p{font-size:13px;margin:0}.result-rooms\x3ediv{display:flex;justify-content:space-between;gap:16px;padding:16px 0;border-bottom:1px solid #ddd}.result-rooms small{display:block;font-size:13px;color:#666;font-weight:400}.result-rooms strong{text-align:right}.products{display:grid;grid-template-columns:1fr 1fr;gap:16px}.products article{border:1px solid #ddd;border-radius:8px;padding:18px;display:flex;flex-direction:column}.products img{height:145px;width:100%;object-fit:contain;margin-bottom:16px}.products small{font-size:13px;color:#666}.products h4{font-size:15px;line-height:1.5;flex:1;margin:8px 0 18px}.products strong{font-size:23px;color:#1a598f}.products .primary{padding:11px}.products .hint{font-size:12px}details{font-size:14px;color:#555;margin-top:24px}summary{cursor:pointer;color:#19598f}footer{display:flex;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:28px 0;margin-top:25px;border-top:1px solid #ddd;font-size:13px;color:#666}footer nav{display:flex;gap:24px}@media(max-width:950px){.workspace{grid-template-columns:minmax(0,1fr) 250px;gap:18px}.panel{padding:24px}aside{padding:22px}}@media(max-width:750px){header{padding:18px}.brand{font-size:24px}.phone{font-size:12px}.shell{padding:26px 16px 0}h1{font-size:30px}.intro\x3ep:last-child{font-size:14px}.eyebrow{font-size:10px}.steps{margin:25px 0 20px}.steps li{flex-direction:column;gap:7px;font-size:11px;text-align:center}.workspace{grid-template-columns:1fr}.panel{padding:22px 18px}aside{position:static}.section-heading h2{font-size:23px}.choice{padding:18px 14px}.choice.selected{padding:17px 13px}.choice strong{font-size:20px}.choice p{font-size:14px}.actions small{display:none}.products{grid-template-columns:1fr}.actions .primary{margin-left:auto}}@media(max-width:400px){.fields,.cards{grid-template-columns:1fr}.phone{display:none}.steps li{font-size:10px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}\n";
const newRoom = (n = 1) => ({ name: n === 1 ? 'Wohnzimmer' : `Raum ${n}`, area: 25, height: 2.5, insulation: 'normal', roof: false, windows: 4, orientation: 'south', shade: 'inside', people: 2, equipment: 150, usage: 'living', pipe: 5 });
function mountKlimaCorner(css, defaults, host, config) {
'use strict';
if (!host || host.dataset.kcMounted === 'true') return;
if (!host.attachShadow) {host.textContent='Bitte öffne den Planer in einem aktuellen Browser.';return;}
host.dataset.kcMounted = 'true';
host.replaceChildren();
const shadow = host.attachShadow({mode:'open'});
const style = document.createElement('style'); style.textContent = css; shadow.appendChild(style);
const main = document.createElement('div');main.className='kc';shadow.appendChild(main);
const state={step:0,system:'mono',customer:'private',rooms:[defaults(1)],active:0,mounting:'yes',postcode:'',location:'',contact:{name:'',phone:'',email:'',company:''},consent:false,website:'',busy:false,ready:null,error:'',sent:false,result:null};
const escape=s=>String(s??'').replace(/[\x26\x3c\x3e"']/g,c=>({'\x26':'\x26amp;','\x3c':'\x26lt;','\x3e':'\x26gt;','"':'\x26quot;',"'":'\x26#39;'}[c]));
const fmt=n=>Number(n).toLocaleString('de-DE',{maximumFractionDigits:1});
const trustedURL=(s,image=false)=>{try{const u=new URL(s);return u.protocol==='https:'&&(image?['cdn02.plentyone.com','cdn02.plentymarkets.com']:['www.klimacorner.de','klimacorner.de']).includes(u.hostname)?escape(u.href):''}catch{return ''}};
const input=(key,label,value,type='text',attributes='')=>`\x3clabel class="field"\x3e\x3cspan\x3e${label}\x3c/span\x3e\x3cinput data-key="${key}" type="${type}" value="${escape(value)}" ${attributes}\x3e\x3c/label\x3e`;
const number=(key,label,value,min,max,step=1)=>input('room.'+key,label,value,'number',`required min="${min}" max="${max}" step="${step}"`);
const select=(key,label,value,options)=>`\x3clabel class="field"\x3e\x3cspan\x3e${label}\x3c/span\x3e\x3cselect data-key="${key}"\x3e${options.map(([v,t])=>`\x3coption value="${v}" ${v===value?'selected':''}\x3e${t}\x3c/option\x3e`).join('')}\x3c/select\x3e\x3c/label\x3e`;
const buttons=(back,text)=>`\x3cdiv class="actions"\x3e\x3cbutton type="button" class="back" data-action="back" data-step="${back}"\x3e← Zurück\x3c/button\x3e\x3cbutton class="primary" ${state.busy?'disabled':''}\x3e${text} →\x3c/button\x3e\x3c/div\x3e`;
function endpoint(path) {
if (!config.API_BASE) throw Error('Die Online-Freischaltung ist noch nicht eingerichtet. Bitte kontaktiere KlimaCorner.');
const base=new URL(config.API_BASE.replace(/\/$/, '')+'/', location.origin);
if (base.origin!==location.origin) throw Error('Die Serveranbindung muss unter derselben Shop-Domain liegen.');
return new URL(path.replace(/^\/api\//,''),base).href;
}
const api=async(path,body)=>{
const controller=new AbortController();
const timer=setTimeout(()=>controller.abort(),20000);
try {
const response=await fetch(endpoint(path),{method:body?'POST':'GET',credentials:'same-origin',headers:body?{'Content-Type':'application/json','Accept':'application/json'}:{'Accept':'application/json'},body:body?JSON.stringify(body):undefined,signal:controller.signal});
let data;try{data=await response.json()}catch{throw Error('Der Planungsdienst ist derzeit nicht erreichbar. Bitte versuche es später erneut.')}
if(!response.ok)throw Error(data.error||'Die Anfrage konnte nicht verarbeitet werden.');
return data;
} catch(error) {if(error.name==='AbortError')throw Error('Die Anfrage dauert zu lange. Bitte versuche es erneut.');throw error}
finally {clearTimeout(timer)}
};
function roomValid(room){return room.name.trim()&&Number.isFinite(room.area)&&room.area>=5&&room.area<=200&&Number.isFinite(room.height)&&room.height>=2&&room.height<=3.5&&Number.isFinite(room.windows)&&room.windows>=0&&room.windows<=100&&room.windows<=room.area*2&&Number.isInteger(room.people)&&room.people>=0&&room.people<=50&&Number.isFinite(room.equipment)&&room.equipment>=0&&room.equipment<=10000&&Number.isFinite(room.pipe)&&room.pipe>=0&&room.pipe<=100}
function stepOne(){return `\x3cdiv class="section-heading"\x3e\x3cspan\x3e01\x3c/span\x3e\x3cdiv\x3e\x3ch2\x3eWas möchtest du kühlen?\x3c/h2\x3e\x3cp\x3eEin Raum oder mehrere? Wähle dein System.\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e\x3cfieldset\x3e\x3clegend\x3eAnlagentyp\x3c/legend\x3e\x3cdiv class="cards"\x3e${[['mono','Mono-Split','Ein Raum. Ein Innen- und ein Außengerät.'],['multi','Multi-Split','Zwei bis fünf Räume. Ein gemeinsames Außengerät.']].map(([v,t,d])=>`\x3clabel class="choice ${v===state.system?'selected':''}"\x3e\x3cinput type="radio" name="system" data-key="system" value="${v}" ${state.system===v?'checked':''}\x3e\x3cstrong\x3e${t}\x3c/strong\x3e\x3cp\x3e${d}\x3c/p\x3e\x3c/label\x3e`).join('')}\x3c/div\x3e\x3c/fieldset\x3e\x3cfieldset\x3e\x3clegend\x3eFür wen planst du?\x3c/legend\x3e\x3cdiv class="cards"\x3e${[['private','Privat'],['business','Gewerblich']].map(([v,t])=>`\x3clabel class="choice compact ${state.customer===v?'selected':''}"\x3e\x3cinput type="radio" name="customer" data-key="customer" value="${v}" ${state.customer===v?'checked':''}\x3e${t}\x3c/label\x3e`).join('')}\x3c/div\x3e\x3c/fieldset\x3e\x3cp class="info"\x3eDu erhältst eine erste Einschätzung der benötigten Kühlleistung und anschließend Gerätevorschläge aus dem KlimaCorner-Shop.\x3c/p\x3e\x3cdiv class="actions"\x3e\x3csmall\x3eUnverbindlich \x26 kostenlos\x3c/small\x3e\x3cbutton type="button" class="primary" data-action="next"\x3eRäume planen →\x3c/button\x3e\x3c/div\x3e`}
function rooms(){const r=state.rooms[state.active];return `\x3cform data-form="rooms"\x3e\x3cdiv class="section-heading"\x3e\x3cspan\x3e02\x3c/span\x3e\x3cdiv\x3e\x3ch2\x3eJeder Raum ist anders.\x3c/h2\x3e\x3cp\x3eMit deinen Angaben schätzen wir den Kühlbedarf.\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e\x3cnav class="room-nav" aria-label="Räume"\x3e${state.rooms.map((x,i)=>`\x3cbutton type="button" class="${i===state.active?'active':''}" data-action="room" data-index="${i}"\x3e${i+1}. ${escape(x.name)}\x3c/button\x3e`).join('')}${state.system==='multi'&&state.rooms.length<5?'\x3cbutton type="button" data-action="add"\x3e+ Raum hinzufügen\x3c/button\x3e':''}\x3c/nav\x3e\x3cdiv class="fields"\x3e${input('room.name','Raumname',r.name,'text','required maxlength="60"')}${select('room.usage','Nutzung',r.usage,[['living','Wohnen'],['sleep','Schlafen'],['office','Büro'],['shop','Laden / Praxis']])}${number('area','Raumfläche (m²)',r.area,5,200,.1)}${number('height','Deckenhöhe (m)',r.height,2,3.5,.05)}${select('room.insulation','Gebäude / Dämmung',r.insulation,[['good','Gut gedämmt / Neubau'],['normal','Durchschnittlich gedämmt'],['poor','Wenig gedämmt / Altbau']])}\x3clabel class="check"\x3e\x3cinput type="checkbox" data-key="room.roof" ${r.roof?'checked':''}\x3eDirekt unter dem Dach\x3c/label\x3e\x3c/div\x3e\x3ch3\x3eFenster \x26 Sonneneinstrahlung\x3c/h3\x3e\x3cdiv class="fields"\x3e${number('windows','Gesamte Fensterfläche (m²)',r.windows,0,100,.1)}${select('room.orientation','Hauptausrichtung',r.orientation,[['north','Nord'],['east','Ost'],['south','Süd'],['west','West']])}${select('room.shade','Verschattung',r.shade,[['outside','Außen, z. B. Rollladen'],['inside','Innen, z. B. Jalousie'],['none','Keine']])}\x3c/div\x3e\x3cp class="hint"\x3eAddiere die Glasflächen. Bei mehreren Ausrichtungen wähle die am stärksten besonnte Seite.\x3c/p\x3e\x3ch3\x3ePersonen \x26 Wärmequellen\x3c/h3\x3e\x3cdiv class="fields"\x3e${number('people','Personen gleichzeitig',r.people,0,50)}${number('equipment','Geräte \x26 Beleuchtung (W)',r.equipment,0,10000)}${number('pipe','Leitung zum Außengerät (m)',r.pipe,0,100,.5)}\x3c/div\x3e\x3cp class="hint"\x3eGerätewärme: z. B. Computer, Bildschirme und Beleuchtung. Die Leitungslänge wird bei der Fachprüfung berücksichtigt.\x3c/p\x3e${state.system==='multi'&&state.rooms.length>2?'\x3cbutton type="button" class="back" data-action="remove"\x3eDiesen Raum entfernen\x3c/button\x3e':''}\x3cp class="info"\x3eFür Wohnräume, Büros und vergleichbare Räume mit 2–3,5 m Deckenhöhe. Produktionswärme, starke Lüftung und große Glasfassaden benötigen eine individuelle Fachplanung.\x3c/p\x3e${buttons(0,'Weiter zum Kontakt')}\x3c/form\x3e`}
function contact(){if(state.sent)return `\x3cdiv class="message"\x3e\x3ch2\x3eEin Klick fehlt noch.\x3c/h2\x3e\x3cp\x3eWir haben einen Bestätigungslink an \x3cstrong\x3e${escape(state.contact.email)}\x3c/strong\x3e gesendet.\x3c/p\x3e\x3cp\x3eBestätige deine E-Mail-Adresse. Danach wird dein Ergebnis freigeschaltet und deine PDF-Anfrage an KlimaCorner übermittelt. Der Link gilt 24 Stunden.\x3c/p\x3e\x3cp\x3eBitte prüfe auch deinen Spam-Ordner.\x3c/p\x3e\x3cbutton class="back" data-action="resend"\x3eAdresse korrigieren / erneut anfordern\x3c/button\x3e\x3c/div\x3e`;return `\x3cform data-form="contact"\x3e\x3cdiv class="section-heading"\x3e\x3cspan\x3e03\x3c/span\x3e\x3cdiv\x3e\x3ch2\x3eDeine Planung. Für dich reserviert.\x3c/h2\x3e\x3cp\x3eBestätige deine E-Mail-Adresse, um das Ergebnis freizuschalten.\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e${state.ready===false?'\x3cp class="notice"\x3eDie E-Mail-Freischaltung ist noch nicht eingerichtet. Derzeit wird keine Anfrage gespeichert oder versendet.\x3c/p\x3e':''}\x3cdiv class="fields"\x3e${input('contact.name','Vor- und Nachname *',state.contact.name,'text','required minlength="2" maxlength="100" autocomplete="name"')}${input('contact.phone','Telefon *',state.contact.phone,'tel','required minlength="6" maxlength="30" autocomplete="tel"')}${input('contact.email','E-Mail-Adresse *',state.contact.email,'email','required maxlength="200" autocomplete="email"')}${state.customer==='business'?input('contact.company','Unternehmen',state.contact.company,'text','maxlength="120" autocomplete="organization"'):''}${input('postcode','Postleitzahl Montageort *',state.postcode,'text','required pattern="[0-9]{5}" inputmode="numeric" autocomplete="postal-code"')}${select('mounting','Montage gewünscht?',state.mounting,[['yes','Ja, mit Montage'],['no','Nein, nur Geräte'],['unsure','Bitte beraten']])}\x3clabel class="field full"\x3e\x3cspan\x3eAufstellort des Außengeräts / Hinweise\x3c/span\x3e\x3ctextarea maxlength="200" data-key="location"\x3e${escape(state.location)}\x3c/textarea\x3e\x3c/label\x3e\x3c/div\x3e\x3clabel class="trap" aria-hidden="true"\x3eWebsite\x3cinput tabindex="-1" data-key="website" autocomplete="off"\x3e\x3c/label\x3e\x3clabel class="check consent"\x3e\x3cinput type="checkbox" required data-key="consent" ${state.consent?'checked':''}\x3e\x3cspan\x3eIch möchte meine Planung freischalten und eine unverbindliche Angebotsanfrage an KlimaCorner senden. Meine Kontakt- und Raumdaten werden dafür verarbeitet. Die \x3ca href="https://www.klimacorner.de/home/datenschutzerklaerung/" target="_blank" rel="noopener"\x3eDatenschutzerklärung\x3c/a\x3e habe ich gelesen. *\x3c/span\x3e\x3c/label\x3e\x3cp class="hint"\x3eNach deiner Bestätigung erhält KlimaCorner deine Anfrage als PDF. Keine Newsletter-Anmeldung.\x3c/p\x3e\x3cdiv class="actions"\x3e\x3cbutton type="button" class="back" data-action="back" data-step="1"\x3e← Räume bearbeiten\x3c/button\x3e\x3cbutton class="primary" ${state.busy||state.ready!==true?'disabled':''}\x3e${state.busy?'Wird gesendet …':'Bestätigungslink anfordern'}\x3c/button\x3e\x3c/div\x3e\x3c/form\x3e`}
function results(){const d=state.result;return `\x3cdiv class="section-heading"\x3e\x3cspan\x3e✓\x3c/span\x3e\x3cdiv\x3e\x3ch2\x3eDein Kühlbedarf im Überblick.\x3c/h2\x3e\x3cp\x3eUnverbindliche Vorabschätzung für deine Räume.\x3c/p\x3e\x3c/div\x3e\x3c/div\x3e\x3cdiv class="total"\x3e\x3cspan\x3eGesamte Kühlleistung\x3c/span\x3e\x3cstrong\x3e${fmt(d.calculation.total)} \x3csmall\x3ekW\x3c/small\x3e\x3c/strong\x3e\x3cp\x3eAlle Räume gleichzeitig · kein pauschaler Leistungsabschlag\x3c/p\x3e\x3c/div\x3e\x3cdiv class="result-rooms"\x3e${d.calculation.rooms.map(r=>`\x3cdiv\x3e\x3cspan\x3e${escape(r.name)}\x3csmall\x3e${fmt(r.area)} m² · ${fmt(r.height)} m Raumhöhe\x3c/small\x3e\x3c/span\x3e\x3cstrong\x3e${fmt(r.kw)} kW\x3csmall\x3eGeräteklasse: ${r.size?fmt(r.size)+' kW':'individuell prüfen'}\x3c/small\x3e\x3c/strong\x3e\x3c/div\x3e`).join('')}\x3c/div\x3e\x3cp class="info"\x3eKälteleistung ist keine elektrische Leistungsaufnahme. Die Vorabschätzung ersetzt keine Kühllastberechnung nach VDI 2078. Kombination, Leistungsteilung und Leitungen müssen fachlich geprüft werden.\x3c/p\x3e\x3ch3\x3eGerätevorschläge aus dem Shop\x3c/h3\x3e\x3cp class="hint"\x3eVorauswahl nach nominaler Kühlleistung; bei Multi-Split zusätzlich nach den einzelnen Raumlasten. Leistung je Innengerät bei gleichzeitigem Betrieb anhand der Herstellertabellen prüfen lassen.\x3c/p\x3e\x3cdiv class="products"\x3e${d.products.map(p=>`\x3carticle\x3e\x3cimg src="${trustedURL(p.image,true)}" alt="${escape(p.name)}" loading="lazy"\x3e\x3csmall\x3e${escape(p.brand)} · ${fmt(p.kw)} kW\x3c/small\x3e\x3ch4\x3e${escape(p.name)}\x3c/h4\x3e\x3cstrong\x3e${Number(p.price).toLocaleString('de-DE',{style:'currency',currency:'EUR'})}\x3c/strong\x3e\x3cp class="hint"\x3einkl. MwSt., zzgl. Versand\x3cbr\x3ePreisstand: ${escape(p.checkedAt)}\x3c/p\x3e\x3ca class="primary" target="_blank" rel="noopener" href="${trustedURL(p.url)}"\x3eIm Shop ansehen ↗\x3c/a\x3e\x3c/article\x3e`).join('')}\x3c/div\x3e${!d.products.length?'\x3cp class="notice"\x3eIm geprüften Katalogstand ist keine passende Kombination hinterlegt. KlimaCorner stellt dir eine individuelle Auswahl zusammen.\x3c/p\x3e':''}\x3cp class="hint"\x3eKatalogstand statt Live-Bestand. Aktuelle Preise und Verfügbarkeit im Shop sind maßgeblich.\x3c/p\x3e\x3cdiv class="actions"\x3e\x3ca class="primary" href="${escape(endpoint('/api/report'))}"\x3ePlanung als PDF ↓\x3c/a\x3e\x3cbutton class="back" data-action="restart"\x3eNeue Planung\x3c/button\x3e\x3c/div\x3e\x3cp class="hint"\x3e${d.delivery==='sent'?'Deine PDF-Anfrage wurde an KlimaCorner übermittelt.':'Deine Freischaltung ist abgeschlossen, die PDF-Übermittlung ist jedoch noch offen. Bitte lade das PDF herunter und sende es bei Bedarf an info@klimacorner.de.'}\x3c/p\x3e\x3cdetails\x3e\x3csummary\x3eBerechnung und Grenzen\x3c/summary\x3e\x3cp\x3eRaumvolumen × 18 / 25 / 35 W/m³ für gute / mittlere / geringe Dämmung, Dachfaktor 1,2. Fensterfläche × 60 / 150 / 180 / 200 W/m² (N / O / S / W), Verschattung 0,25 / 0,65 / 1,0 (außen / innen / keine). Dazu 120 W je Person und eingegebene Gerätewärme. Aufrundung je Raum auf 0,1 kW. Vereinfachte Modellannahmen; keine normgerechte Auslegung. Nutzungsart und Leitungslänge dienen der Fachprüfung. Lüftung, Entfeuchtung und spezielle Gewerbelasten werden nicht detailliert berechnet.\x3c/p\x3e\x3c/details\x3e`}
const params=new URLSearchParams(location.hash.slice(1));const verification={id:params.get('id'),token:params.get('token')};
if(config.API_BASE && verification.id && /^[a-f0-9]{64}$/.test(verification.token||'')){history.replaceState(null,'',location.pathname+location.search);state.step=4}
function render(){main.innerHTML=`\x3cheader\x3e\x3ca class="brand" href="https://www.klimacorner.de/"\x3eKlimaCorner\x3csmall\x3eKLIMAANLAGENPLANER\x3c/small\x3e\x3c/a\x3e\x3ca class="phone" href="tel:+494163833930"\x3e04163 833 93 0\x3c/a\x3e\x3c/header\x3e\x3cdiv class="shell"\x3e\x3cdiv class="intro"\x3e\x3cp class="eyebrow"\x3eDEIN WEG ZUM PASSENDEN RAUMKLIMA\x3c/p\x3e\x3ch1\x3eKühle Räume. \x3cspan\x3eKlar geplant.\x3c/span\x3e\x3c/h1\x3e\x3cp\x3ePlane deine Klimaanlage – Raum für Raum.\x3c/p\x3e\x3c/div\x3e\x3col class="steps"\x3e${['Dein Projekt','Deine Räume','Kontakt bestätigen','Dein Ergebnis'].map((t,i)=>`\x3cli class="${state.step===i?'current':state.step>i&&state.step!==4?'done':''}"\x3e\x3cspan\x3e${i+1}\x3c/span\x3e${t}\x3c/li\x3e`).join('')}\x3c/ol\x3e\x3cdiv class="workspace"\x3e\x3csection class="panel"\x3e${state.error?`\x3cp class="error" role="alert"\x3e${escape(state.error)}\x3c/p\x3e`:''}${state.step===0?stepOne():state.step===1?rooms():state.step===2?contact():state.step===3?results():`\x3cdiv class="message"\x3e\x3ch2\x3eE-Mail bestätigen\x3c/h2\x3e\x3cp\x3eBestätige deine Adresse, um die Kühlleistung und Gerätevorschläge zu sehen und deine Anfrage an KlimaCorner zu übermitteln.\x3c/p\x3e\x3cbutton class="primary" data-action="verify" ${state.busy?'disabled':''}\x3e${state.busy?'Wird bestätigt …':'Bestätigen \x26 Ergebnis ansehen'}\x3c/button\x3e\x3c/div\x3e`}\x3c/section\x3e\x3caside\x3e\x3cp class="eyebrow"\x3eDEINE KLIMAPLANUNG\x3c/p\x3e\x3ch2\x3eEin gutes Klima\x3cbr\x3ebeginnt mit einem Plan.\x3c/h2\x3e\x3cdl\x3e\x3cdiv\x3e\x3cdt\x3eAnlagentyp\x3c/dt\x3e\x3cdd\x3e${state.system==='mono'?'Mono-Split':'Multi-Split'}\x3c/dd\x3e\x3c/div\x3e\x3cdiv\x3e\x3cdt\x3eRäume\x3c/dt\x3e\x3cdd\x3e${state.rooms.length}\x3c/dd\x3e\x3c/div\x3e\x3cdiv\x3e\x3cdt\x3eGesamtfläche\x3c/dt\x3e\x3cdd data-total-area\x3e${fmt(state.rooms.reduce((n,r)=>n+(Number.isFinite(r.area)?r.area:0),0))} m²\x3c/dd\x3e\x3c/div\x3e\x3c/dl\x3e\x3cp class="locked"\x3e${state.result?'✓ Ergebnis freigeschaltet':'Kühlleistung \x26 Gerätevorschläge nach deiner E-Mail-Bestätigung'}\x3c/p\x3e\x3cul\x3e\x3cli\x3eKühlbedarf je Raum\x3c/li\x3e\x3cli\x3eGeräte mit Preis \x26 Shoplink\x3c/li\x3e\x3cli\x3ePersönliches Angebot\x3c/li\x3e\x3c/ul\x3e\x3ca href="mailto:info@klimacorner.de"\x3einfo@klimacorner.de →\x3c/a\x3e\x3c/aside\x3e\x3c/div\x3e\x3cfooter\x3e\x3cspan\x3e© ${new Date().getFullYear()} KlimaCorner\x3c/span\x3e\x3cnav\x3e\x3ca href="https://www.klimacorner.de/home/impressum/" target="_blank" rel="noopener"\x3eImpressum\x3c/a\x3e\x3ca href="https://www.klimacorner.de/home/datenschutzerklaerung/" target="_blank" rel="noopener"\x3eDatenschutz\x3c/a\x3e\x3c/nav\x3e\x3c/footer\x3e\x3c/div\x3e`}
function go(n){state.error='';state.step=n;render();host.scrollIntoView({behavior:'smooth',block:'start'})}
main.addEventListener('input',e=>{const el=e.target,key=el.dataset.key;if(!key)return;const value=el.type==='checkbox'?el.checked:el.type==='number'?(el.value===''?NaN:Number(el.value)):el.value;if(key.startsWith('room.'))state.rooms[state.active][key.slice(5)]=value;else if(key.startsWith('contact.'))state.contact[key.slice(8)]=value;else state[key]=value;const total=main.querySelector('[data-total-area]');if(total)total.textContent=fmt(state.rooms.reduce((n,r)=>n+(Number.isFinite(r.area)?r.area:0),0))+' m²'});
main.addEventListener('change',e=>{const el=e.target;if(el.dataset.key==='system'){state.system=el.value;if(el.value==='mono')state.rooms=[state.rooms[0]];else if(state.rooms.length===1)state.rooms.push(defaults(2));state.active=0;render()}else if(el.dataset.key==='customer'){state.customer=el.value;render()}});
main.addEventListener('click',async e=>{const b=e.target.closest('[data-action]');if(!b)return;const a=b.dataset.action;if(a==='next')go(1);if(a==='back')go(Number(b.dataset.step));if(a==='room'){state.active=Number(b.dataset.index);render()}if(a==='add'&&state.system==='multi'&&state.rooms.length<5){state.rooms.push(defaults(state.rooms.length+1));state.active=state.rooms.length-1;render()}if(a==='remove'&&state.rooms.length>2){state.rooms.splice(state.active,1);state.active=0;render()}if(a==='resend'){state.sent=false;render()}if(a==='restart'){state.rooms=[defaults(1)];state.active=0;state.system='mono';state.customer='private';state.result=null;state.sent=false;state.contact={name:'',email:'',phone:'',company:''};state.consent=false;state.postcode='';state.location='';state.mounting='yes';state.website='';go(0)}if(a==='verify'){state.busy=true;state.error='';render();try{await api('/api/verify',verification);await loadResult()}catch(err){state.error=err.message}finally{state.busy=false;render()}}});
main.addEventListener('submit',async e=>{e.preventDefault();state.error='';if(e.target.dataset.form==='rooms'){const bad=state.rooms.findIndex(r=>!roomValid(r));if(bad>=0){state.active=bad;state.error='Bitte prüfe die Angaben für '+state.rooms[bad].name;render();return}go(2);return}if(e.target.dataset.form==='contact'){if(state.ready!==true||state.busy)return;state.busy=true;render();try{await api('/api/plan',{system:state.system,customer:state.customer,rooms:state.rooms,mounting:state.mounting,postcode:state.postcode,location:state.location,contact:state.contact,consent:state.consent,website:state.website});state.sent=true}catch(err){state.error=err.message}finally{state.busy=false;render()}}});
async function loadResult(){const d=await api('/api/result');if(!d.calculation||!Array.isArray(d.calculation.rooms)||!Array.isArray(d.products))throw Error('Das Ergebnis konnte nicht geladen werden.');state.result=d;state.rooms=d.calculation.rooms;state.system=d.system;state.step=3}
render();api('/api/status').then(d=>{state.ready=d.ready;if(state.step===2)render()}).catch(()=>{state.ready=false;if(state.step===2)render()});
if(config.API_BASE && (new URLSearchParams(location.search).has('kc_ergebnis') || new URLSearchParams(location.search).has('ergebnis')))loadResult().then(render).catch(e=>{state.error=e.message;render()});
}
function start() {
document.querySelectorAll('[data-kc-plenty="klimaplaner"]').forEach(function (host) {
mountKlimaCorner(STYLE,newRoom,host,CONFIG);
});
}
start();
if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',start,{once:true});
window.setTimeout(start,0);
})();