1import{b as f,r as m,j as e,bw as k}from"./index-BUCvl-7H.js";import{P as N,C as _}from"./page-blocks-Dsnbw40X.js";import{R as C}from"./route-jsonld-Sb2VTp7_.js";import"./product-backdrop-BD36kQZu.js";import"./page-jsonld-CA3akf3n.js";const b={silica:{name:"Silica",accent:"#7c3aed",slug:"vita-silica"},root:{name:"Root",accent:"#d4699a",slug:"vita-root"},base:{name:"Base",accent:"#e8a838",slug:"vita-base"},cal:{name:"Cal",accent:"#1e4ea8",slug:"vita-cal"},sweet:{name:"Sweet",accent:"#e8a890",slug:"vita-sweet"},bulk:{name:"Bulk",accent:"#6ba84f",slug:"vita-bulk"},bud:{name:"Bud",accent:"#d65a48",slug:"vita-bud"},finish:{name:"Finish",accent:"#8b1a1a",slug:"vita-finish"}};function g(t,s,r,a){return a==="light"?t:a==="standard"?s:r}function h(t,s){if(s)return t==="max"?1:.25}function x(t,s,r,a){return a==="max"?r.toFixed(1):`${t.toFixed(1)} â ${s.toFixed(1)}`}function w(t,s){const r=[];for(let a=1;a<=t;a++)if(a===1)r.push({label:`Week ${a}`,ec:x(.5,1,1.4,s),doses:{root:2,base:2,silica:h(s,!1)}});else{const l=a>=3;r.push({label:`Week ${a}`,ec:x(.7,1.2,1.6,s),doses:{silica:h(s,!0),root:1,base:3,...l?{cal:1,sweet:1}:{}}})}return r}function y(t,s){const r=g(4,5,5,s),a=h(s,!0),l=[];for(let n=1;n<=t;n++){const i=t-n;let u;i<=1?u={label:`Week ${n}`,ec:x(1.2,2,2.2,s),doses:{silica:a,bulk:r,bud:1,finish:1}}:i===2?u={label:`Week ${n}`,ec:x(1.2,2,2.2,s),doses:{silica:a,cal:1,sweet:1,bulk:r,bud:1}}:i===3?u={label:`Week ${n}`,ec:x(1,1.6,2,s),doses:{silica:a,cal:1,sweet:1,bulk:r}}:u={label:`Week ${n}`,ec:x(1,1.6,2,s),doses:{silica:a,cal:1,sweet:1,base:g(4,4,4,s)}},l.push(u)}const o=l.findIndex(n=>n.doses.bulk!==void 0),c=o>0&&l.slice(0,o).some(n=>n.doses.base!==void 0);return o>-1&&c&&(l[o].note="Switch from Base to Bulk"),l}function W(t){const s=Math.max(1,Math.min(6,Math.round(t.vegWeeks))),r=Math.max(6,Math.min(12,Math.round(t.flowerWeeks)));return{veg:w(s,t.strength),flower:y(r,t.strength)}}const S=["silica","root","base","cal","sweet"],F=["silica","cal","sweet","base|bulk","bud","finish"];function P(t,s){if(s==="base|bulk")return t.doses.bulk!==void 0?{product:"bulk",ml:t.doses.bulk}:t.doses.base!==void 0?{product:"base",ml:t.doses.base}:void 0;const r=t.doses[s];return r===void 0?void 0:{product:s,ml:r}}function M(t,s){if(!s||s<=0)return null;const r=t*s;return Number.isInteger(r)?`${r} ml`:`${r.toFixed(2)} ml`}function $({row:t,col:s,reservoir:r}){const a=P(t,s);if(!a)return e.jsxs("div",{className:"flex items-center gap-2 opacity-30",children:[e.jsx("span",{"aria-hidden":!0,className:"inline-block w-2.5 h-2.5 rounded-full border border-muted-foreground/40"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"â"})]});const l=b[a.product],o=M(a.ml,r),c=s==="base|bulk";return e.jsxs("div",{className:"flex items-start gap-2.5",children:[e.jsx("span",{"aria-hidden":!0,className:"mt-1.5 inline-block w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:l.accent}}),e.jsxs("div",{className:"leading-tight",children:[e.jsxs("div",{className:"font-mono text-xs",children:[e.jsx("span",{className:"font-semibold",children:a.ml}),e.jsx("span",{className:"text-muted-foreground",children:" ml"})]}),c&&e.jsx("div",{className:"font-mono text-[9px] tracking-[0.18em] uppercase mt-0.5",style:{color:l.accent},children:l.name}),o&&e.jsx("div",{className:"font-mono text-[10px] text-muted-foreground mt-0.5",children:o})]})]})}function B({col:t}){if(t==="base|bulk"){const r=b.base,a=b.bulk;return e.jsx("div",{className:"flex items-center gap-1.5",children:[r,a].map((l,o)=>e.jsxs(m.Fragment,{children:[o>0&&e.jsx("span",{className:"text-muted-foreground text-[10px]",children:"/"}),e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-full text-[11px] border bg-background",style:{borderColor:l.accent+"80",color:l.accent},children:[e.jsx("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:l.accent}}),l.name]})]},l.name))})}const s=b[t];return e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[11px] border bg-background",style:{borderColor:s.accent+"80",color:s.accent}
1,children:[e.jsx("span",{"aria-hidden":!0,className:"inline-block w-1.5 h-1.5 rounded-full",style:{backgroundColor:s.accent}}),s.name]})}function p({title:t,hour:s,cols:r,rows:a,reservoir:l}){const{t:o}=f();return e.jsxs("div",{className:"border border-border rounded-sm overflow-hidden mb-10",children:[e.jsxs("div",{className:"flex items-baseline justify-between p-5 bg-mist border-b border-border",children:[e.jsx("h3",{className:"font-display text-2xl",children:t}),e.jsxs("span",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:[s," · ",o("feedCalculator.ml_per_litre_note")," ",l?o("feedCalculator.total_per_reservoir_note"):""]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm min-w-[640px]",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border bg-background",children:[e.jsx("th",{className:"text-left p-4 font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:o("feedCalculator.week_column")}),e.jsx("th",{className:"text-left p-4 font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground",children:o("feedCalculator.total_ec_column")}),r.map(c=>e.jsx("th",{className:"text-left p-4",children:e.jsx(B,{col:c})},c))]})}),e.jsx("tbody",{children:a.map((c,n)=>e.jsxs(m.Fragment,{children:[c.note&&e.jsx("tr",{className:"border-t border-border",children:e.jsx("td",{colSpan:2+r.length,className:"p-0",children:e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 bg-primary/10 border-l-4 border-primary",children:[e.jsx("span",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-primary",children:o("feedCalculator.transition_label")}),e.jsx("span",{className:"text-xs font-medium text-foreground",children:c.note})]})})}),e.jsxs("tr",{className:k("border-t border-border",n%2===1&&"bg-mist/40"),children:[e.jsx("td",{className:"p-4 font-display text-lg align-top",children:c.label}),e.jsx("td",{className:"p-4 font-mono text-xs align-top",children:c.ec}),r.map(i=>e.jsx("td",{className:"p-4 align-top",children:e.jsx($,{row:c,col:i,reservoir:l})},i))]})]},c.label))})]})})]})}function j({value:t,min:s,max:r,onChange:a,label:l}){const{t:o}=f();return e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground mb-2",children:l}),e.jsxs("div",{className:"inline-flex items-center border border-border rounded-sm bg-background",children:[e.jsx("button",{type:"button",onClick:()=>a(Math.max(s,t-1)),className:"px-3 h-10 text-lg hover:bg-mist cursor-pointer","aria-label":o("feedCalculator.decrease_aria",{label:l}),children:"â"}),e.jsx("span",{className:"w-12 text-center font-display text-xl",children:t}),e.jsx("button",{type:"button",onClick:()=>a(Math.min(r,t+1)),className:"px-3 h-10 text-lg hover:bg-mist cursor-pointer","aria-label":o("feedCalculator.increase_aria",{label:l}),children:"+"})]})]})}function R(){const{t}=f(),[s,r]=m.useState(2),[a,l]=m.useState(8),[o,c]=m.useState("standard"),[n,i]=m.useState(20),u=m.useMemo(()=>W({vegWeeks:s,flowerWeeks:a,strength:o}),[s,a,o]);return e.jsxs("div",{children:[e.jsxs("div",{className:"border border-border rounded-sm p-6 md:p-8 bg-background mb-10",children:[e.jsxs("div",{className:"grid gap-6 md:grid-cols-4 items-end",children:[e.jsx(j,{label:t("feedCalculator.veg_weeks_label"),value:s,min:1,max:6,onChange:r}),e.jsx(j,{label:t("feedCalculator.flower_weeks_label"),value:a,min:6,max:12,onChange:l}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground mb-2",children:t("feedCalculator.ec_strength_label")}),e.jsx("div",{className:"inline-flex border border-border rounded-sm overflow-hidden",children:["light","standard","max"].map(d=>e.jsx("button",{type:"button",onClick:()=>c(d),className:k("px-4 h-10 text-xs uppercase tracking-[0.15em] cursor-pointer transition-colors",o===d?"bg-foreground text-background":"bg-background hover:bg-mist"),children:t(`feedCalculator.strength_${d}`)},d))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-muted-foreground mb-2",children:t("feedCalculator.reservoir_label")}),e.jsx("input",{type:"number",min:0,max:2e3,value:n??"",onChange:d=>i(d.target.value===""?null:Number(d.target.value)),placeholder:t("feedCalculator.reservoir_placeholder"),className:"h-10 w-32 border border-border rounded-sm px-3 bg-background font-mono text-sm focus:outline-none focus:ring-1 focus:ring-foreground"})]})]}),e.jsx("p",{className:"mt-5 text-xs text-muted-foreground",children:t("feedCalculator.note_text")})]}),e.jsx(p,{title:t("feedCalculator.veg_phase_title"),hour:t("feedCalculator.hour_18"),cols:S,rows:u.veg,reservoir:n}),e.jsx(p,{title:t("feedCalculator.transplant_doctor_title"),hour:t("feedCalculator.hour_as_needed"),cols:["silica","root","cal"],rows:[{label:t("feedCalculator.dip_soak_label"),ec:"â",doses:{root:2,silica:1,cal:1}}],reservoir:n}),e.jsx(p,{title:t("feedCalculator.flower_phase_title"),hour:t("feedCalculator.hour_12"),cols:F,rows:u.flower,reservoir:n}),e.jsx("div",{className:"grid md:grid-cols-2 gap-px bg-border border border-border rounded-sm overflow-hidden",children:[["feedCalculator.guideline1_title","feedCalculator.guideline1_body"],["feedCalculator.guideline2_title","feedCalculator.guideline2_body"],["feedCalculator.guideline3_title","feedCalculator.guideline3_body"],["feedCalculator.guideline4_title","feedCalculator.guideline4_body"]].map(([d,v])=>e.jsxs("div",{className:"bg-background p-6",children:[e.jsx("p",{className:"font-mono text-[10px] tracking-[0.22em] uppercase text-primary",children:t("feedCalculator.guideline_label")}),e.jsx("h4",{className:"mt-2 font-display text-lg",children:t(d)}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:t(v)})]},d))})]})}function V(){const{t}=f();return e.jsxs(e.Fragment,{children:[e.jsx(C,{path:"/feed-programs",type:"WebPage"}),e.jsx(N,{eyebrow:t("feedPrograms.hero_eyebrow"),title:e.jsxs(e.Fragment,{children:[t("feedPrograms.hero_title").split("Week by week.")[0],e.jsx("span",{className:"gradient-vita-text",children:"Week by week."})]}),subtitle:t("feedPrograms.hero_subtitle")}),e.jsx("section",{className:"container-vp pb-32",children:e.jsx(R,{})}),e.jsx(_,{eyebrow:t("feedPrograms.cta_eyebrow"),title:t("feedPrograms.cta_title"),primary:{to:"/become-a-supplier",label:t("feedPrograms.cta_primary")}})]})}export{V as component};
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.