1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,192828,e=>{"use strict";var t=e.i(843476),r=e.i(271645);e.i(785269);var s=e.i(322831),a=e.i(972520),l=e.i(921557),i=e.i(595468),n=e.i(878894),c=e.i(751737),d=e.i(952571),m=e.i(515288),o=e.i(793479),x=e.i(110204),u=e.i(367692),h=e.i(975157),b=e.i(26488),f=e.i(93046);let g=e=>Math.round(100*e)/100,p={sellingPriceGross:29.9,purchasePriceNet:6.5,vatRatePct:19,referralFeePct:15,fulfillmentFee:3.9,otherUnitCosts:.6,returnRatePct:4,returnCostPerReturn:8,desiredMarginPct:20};var j=e.i(204733);let y=[{key:"sellingPriceGross",labelKey:"wmRechner.fieldSellingPrice",unit:"â¬",step:.1},{key:"purchasePriceNet",labelKey:"wmRechner.fieldPurchasePrice",unit:"â¬",step:.1},{key:"referralFeePct",labelKey:"wmRechner.fieldReferralFee",unit:"%",step:.5},{key:"fulfillmentFee",labelKey:"wmRechner.fieldFulfillment",unit:"â¬",step:.1},{key:"otherUnitCosts",labelKey:"wmRechner.fieldOtherCosts",unit:"â¬",step:.1},{key:"returnRatePct",labelKey:"wmRechner.fieldReturnRate",unit:"%",step:.5},{key:"returnCostPerReturn",labelKey:"wmRechner.fieldReturnCost",unit:"â¬",step:.5}],w=e=>e.toLocaleString("de-DE",{style:"currency",currency:"EUR"}),N=e=>`${e.toLocaleString("de-DE",{maximumFractionDigits:1})} %`;e.s(["WunschmargenRechner",0,function({embedded:e}={}){let{t:R}=(0,s.useTranslation)(),v=(0,b.useDemoMode)(),[P,M]=(0,r.useState)(p),A=(0,r.useMemo)(()=>{let e,t,r,s,a,l,i,n,c,d,m,o;return t=Math.max(0,Number(P.sellingPriceGross)||0),s=(r=Math.max(0,Number(P.vatRatePct)||0))/(100+r)*t,a=t*(Math.max(0,Number(P.referralFeePct)||0)/100),l=Math.max(0,Number(P.returnRatePct)||0)/100*Math.max(0,Number(P.returnCostPerReturn)||0),i=t-Math.max(0,Number(P.purchasePriceNet)||0)-s-a-Math.max(0,Number(P.fulfillmentFee)||0)-Math.max(0,Number(P.otherUnitCosts)||0)-l,m=(d=Math.max(0,(n=t>0?i/t*100:0)-(c=Math.max(0,Number(P.desiredMarginPct)||0))))/100*t,o=Math.max(0,c-n),e=i<=0?"loss":n<c?"unreachable":d<5?"tight":"reachable",{vat:g(s),referralFee:g(a),returnCost:g(l),profitBeforeAds:g(i),marginBeforeAdsPct:g(n),breakEvenAcosPct:g(Math.max(0,n)),targetTacosPct:g(d),adBudgetPerUnit:g(m),profitAfterAds:g(i-m),marginGapPct:g(o),status:e}},[P]),k=(e,t)=>{let r="number"==typeof t?t:Number(String(t).replace(",","."));M(t=>({...t,[e]:Number.isFinite(r)?r:0}))}
1,C={reachable:{icon:i.CheckCircle2,tone:"text-emerald-600 dark:text-emerald-400",box:"border-emerald-500/30 bg-emerald-500/5",textKey:"wmRechner.statusReachable"},tight:{icon:n.AlertTriangle,tone:"text-amber-600 dark:text-amber-400",box:"border-amber-500/30 bg-amber-500/5",textKey:"wmRechner.statusTight"},unreachable:{icon:n.AlertTriangle,tone:"text-destructive",box:"border-destructive/30 bg-destructive/5",textKey:"wmRechner.statusUnreachable"},loss:{icon:c.ShieldAlert,tone:"text-destructive",box:"border-destructive/30 bg-destructive/5",textKey:"wmRechner.statusLoss"}}[A.status],K=C.icon,B=[{labelKey:"wmRechner.rowPurchase",value:P.purchasePriceNet},{labelKey:"wmRechner.rowVat",value:A.vat},{labelKey:"wmRechner.rowReferral",value:A.referralFee},{labelKey:"wmRechner.rowFulfillment",value:P.fulfillmentFee},{labelKey:"wmRechner.rowOther",value:P.otherUnitCosts},{labelKey:"wmRechner.rowReturns",value:A.returnCost}];return(0,t.jsxs)("section",{className:e?"relative isolate overflow-hidden py-24 bg-muted/30":"py-20 lg:py-28",children:[e&&(0,t.jsx)(j.EcomBg,{motif:"wachstum",glow:"right",fade:"top"}),(0,t.jsxs)("div",{className:"container mx-auto px-6",children:[(0,t.jsxs)(f.AnimatedSection,{className:"text-center mb-12 max-w-3xl mx-auto",children:[(0,t.jsxs)("div",{className:"inline-flex items-center gap-1.5 text-sm font-medium bg-secondary text-secondary-foreground px-4 py-1.5 rounded-full mb-4",children:[(0,t.jsx)(l.Calculator,{className:"w-3.5 h-3.5"}),R("wmRechner.badge")]}),(0,t.jsx)(e?"h2":"h1",{className:"text-3xl lg:text-5xl font-bold tracking-tight mb-4 text-balance",children:R("wmRechner.title")}),(0,t.jsx)("p",{className:"text-lg text-muted-foreground text-pretty",children:R("wmRechner.description")})]}),(0,t.jsxs)("div",{className:"grid lg:grid-cols-5 gap-6 max-w-6xl mx-auto items-start",children:[(0,t.jsx)(f.AnimatedSection,{delay:100,className:"lg:col-span-3",children:(0,t.jsx)(m.Card,{children:(0,t.jsxs)(m.CardContent,{className:"p-6 space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"font-semibold mb-1",children:R("wmRechner.inputsTitle")}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:R("wmRechner.inputsHint")})]}),(0,t.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[y.map(e=>(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(x.Label,{htmlFor:`wm-${e.key}`,className:"text-sm",children:R(e.labelKey)}),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(o.Input,{id:`wm-${e.key}`,type:"number",inputMode:"decimal",min:0,step:e.step,value:P[e.key],onChange:t=>k(e.key,t.target.value),className:"pr-9 tabular-nums"}),(0,t.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:e.unit})]})]},e.key)),(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)(x.Label,{className:"text-sm",children:R("wmRechner.fieldVat")}),(0,t.jsx)("div",{className:"flex gap-2",role:"radiogroup","aria-label":R("wmRechner.fieldVat"),children:[19,7].map(e=>(0,t.jsxs)("button",{type:"button",role:"radio","aria-checked":P.vatRatePct===e,onClick:()=>k("vatRatePct",e),className:(0,h.cn)("flex-1 h-9 rounded-md border text-sm font-medium transition-colors",P.vatRatePct===e?"border-primary bg-primary/10 text-primary":"border-input bg-background hover:bg-muted"),children:[e," %"]},e))})]})]}),(0,t.jsxs)("div",{className:"pt-4 border-t",children:[(0,t.jsxs)("div",{className:"flex justify-between items-baseline mb-3",children:[(0,t.jsx)(x.Label,{htmlFor:"wm-desired",className:"text-base font-semibold",children:R("wmRechner.fieldDesiredMargin")}),(0,t.jsxs)("span",{className:"text-2xl font-bold text-primary tabular-nums",children:[P.desiredMarginPct," %"]})]}),(0,t.jsx)(u.Slider,{id:"wm-desired",value:[P.desiredMarginPct],onValueChange:([e])=>k("desiredMarginPct",e),min:0,max:60,step:1,"aria-label":R("wmRechner.fieldDesiredMargin")}),(0,t.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mt-2",children:[(0,t.jsx)("span",{children:"0 %"}),(0,t.jsx)("span",{children:"60 %"})]}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-3 flex gap-2",children:[(0,t.jsx)(d.Info,{className:"w-3.5 h-3.5 shrink-0 mt-0.5 text-primary"}),R("wmRechner.desiredHint")]})]})]})})}),(0,t.jsx)(f.AnimatedSection,{delay:200,className:"lg:col-span-2 lg:sticky lg:top-24",children:(0,t.jsx)(m.Card,{className:"border-primary/30 shadow-lg shadow-primary/10",children:(0,t.jsxs)(m.CardContent,{className:"p-6 space-y-5",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs uppercase tracking-wide text-muted-foreground mb-1",children:R("wmRechner.resultTacosLabel")}),(0,t.jsx)("div",{className:"text-5xl font-bold text-primary tabular-nums leading-none",children:N(A.targetTacosPct)}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground mt-2 tabular-nums",children:R("wmRechner.resultTacosSub",{budget:w(A.adBudgetPerUnit)})})]}),(0,t.jsxs)("div",{className:(0,h.cn)("rounded-lg border p-3 flex gap-2 text-sm",C.box),children:[(0,t.jsx)(K,{className:(0,h.cn)("w-4 h-4 shrink-0 mt-0.5",C.tone)}),(0,t.jsx)("span",{className:"text-foreground",children:R(C.textKey,{margin:N(A.marginBeforeAdsPct),desired:N(P.desiredMarginPct),gap:N(A.marginGapPct)})})]}),(0,t.jsxs)("dl",{className:"text-sm space-y-1.5 tabular-nums",children:[(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:R("wmRechner.rowRevenue")}),(0,t.jsx)("dd",{className:"font-medium",children:w(P.sellingPriceGross)})]}),B.map(e=>(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("dt",{className:"text-muted-foreground",children:["â ",R(e.labelKey)]}),(0,t.jsx)("dd",{children:w(e.value)})]},e.labelKey)),(0,t.jsxs)("div",{className:"flex justify-between border-t pt-1.5 font-semibold",children:[(0,t.jsx)("dt",{children:R("wmRechner.rowProfitBeforeAds")}),(0,t.jsxs)("dd",{className:A.profitBeforeAds<0?"text-destructive":"",children:[w(A.profitBeforeAds)," · ",N(A.marginBeforeAdsPct)]})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsx)("dt",{className:"text-muted-foreground",children:R("wmRechner.rowBreakEven")}),(0,t.jsx)("dd",{children:N(A.breakEvenAcosPct)})]}),(0,t.jsxs)("div",{className:"flex justify-between",children:[(0,t.jsxs)("dt",{className:"text-muted-foreground",children:["â ",R("wmRechner.rowAdBudget")]}),(0,t.jsx)("dd",{children:w(A.adBudgetPerUnit)})]}),(0,t.jsxs)("div",{className:"flex justify-between border-t pt-1.5 font-semibold text-primary",children:[(0,t.jsx)("dt",{children:R("wmRechner.rowProfitAfterAds")}),(0,t.jsxs)("dd",{children:[w(A.profitAfterAds)," · ",N(Math.min(P.desiredMarginPct,Math.max(0,A.marginBeforeAdsPct)))]})]})]}),(0,t.jsxs)("div",{className:"pt-2 border-t",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:R("wmRechner.ctaText")}),(0,t.jsxs)("a",{href:v?"/demo/buchen":"/registrieren",className:"inline-flex w-full items-center justify-center gap-2 h-11 px-6 rounded-xl bg-primary text-primary-foreground hover:bg-primary/90 transition-colors font-medium",children:[v?R("demoMode.cta"):R("wmRechner.cta"),(0,t.jsx)(a.ArrowRight,{className:"w-4 h-4"})]})]})]})})})]}),(0,t.jsxs)(f.AnimatedSection,{delay:300,className:"max-w-3xl mx-auto mt-12 text-sm text-muted-foreground space-y-2",children:[(0,t.jsx)("p",{children:R("wmRechner.footnote1")}),(0,t.jsx)("p",{children:R("wmRechner.footnote2")})]})]})]})}],192828)}]);
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.