PageSourceSearch

https://vandebron.nl/react-router-assets/assets/_index-B4nlotpy.js

js vandebron.nl collected 2026-10-01 13:05:24 UTC 11,420 bytes, 1 lines download raw bytes

1import{j as e,r as f,w as q,d as Q}from"./index--bkpxHvA.js";import{n as Z,g as J}from"./index-DNusNDDg.js";import{k as g,j as ee,d as C,V as u,c as U,y as j,v as te,O as ne,e as R,z as M,F as $,f as w,_,m as oe,G as y,n as ie,g as se,T as z}from"./index-CId1-P7U.js";import{M as re}from"./MarkdownContent-w8T48bjH.js";import{R as ae,C as le}from"./ReviewBlock-MKP3GHOp.js";import{L as ce}from"./Link-BvPg0_Io.js";import{B as de}from"./BlogPreviewCard-BPPMIes_.js";import{B as me}from"./BottomSection-DNFWBjva.js";import{l as pe}from"./sentry-react-router-D5JZ8ZQh.js";import{o as ue,b as ge,s as F,c as he,u as xe,t as fe}from"./types-BWP1Gyi0.js";import{f as je}from"./formatNumber-DNDFv8A5.js";import{s as be}from"./signupAnalytics-qAFrayIo.js";import{u as ke}from"./validationApi-B5606wro.js";import{t as ve}from"./mathematical-BE2ntKPf.js";import{a as Te}from"./formatNLCurrency-DW09WPtI.js";import{w as Ne}from"./navigation-BMHPrRy_.js";import"./client-KQlEJ-D7.js";import"./index-DMsm8n0X.js";import"./format-D_pApSvw.js";import"./debug-build-D6Gwv6rg.js";import"./nl-D1KPks0C.js";import"./useGetFaqs-117SwW-d.js";import"./contentApi-Dzv0BfAf.js";import"./index-DZ_Kha3d.js";import"./utils-DXLde0vT.js";import"./index-D44T47Mp.js";import"./react-oidc-context-BtHEtPRF.js";import"./analytics-BpezAAYu.js";var ye="_150gg2k0",Ce="_150gg2k1";const Se=({content:t})=>e.jsx("div",{children:t.map((n,i)=>{var p;const{fields:o}=n,{flipped:r,title:s,titleSize:l,subtitle:a,buttonURL:c,buttonVariant:h,textBody:b,images:S,buttonText:B,ctaTitle:k,ctaUrl:P}=o;if(n.sys.contentType.sys.id==="cpReviewBlock"){const m=((p=n.fields.reviews)==null?void 0:p.map(({fields:x})=>({title:String(x.title),rating:Number(x.rating),text:String(x.text),topic:String(x.topic)})))||[];return e.jsx(g,{paddingTop:{mobile:"3",desktop:"8"},paddingBottom:{mobile:"1.25",desktop:"4"}
1,children:e.jsx(ae,{title:s,description:a,ctaLabel:k,ctaLink:P,reviews:m})},s+i)}if(!S)return null;const v=S[0];if(!v)return null;const d={src:v.fields.file.url,alt:v.fields.description??""};return e.jsx(g,{paddingY:{mobile:"1.25",desktop:"4"},children:e.jsxs(ee,{className:ye,flipped:r,image:d,children:[e.jsx(C,{as:l,marginBottom:"none",size:"h3",children:s}),e.jsx(re,{source:b,componentsOverride:{p:({children:m})=>e.jsx(U,{marginBottom:"none",marginTop:"1",size:"p2",children:m}),ul:({children:m})=>e.jsx("ul",{className:Ce,children:m}),li:({children:m})=>e.jsx("li",{children:e.jsx(u,{marginBottom:"1",size:"xlarge",children:m})})}}),B&&c&&e.jsx(le,{buttonText:B,buttonURL:c,iconAfter:"arrow-right",variant:h,marginTop:"2"})]})},`content-block-${s+i}`)})});var Be="_1qt22420";function Ee({fields:t}){const{description:n,title:i}=t;return e.jsx(j,{justifyContent:"center",children:e.jsxs(g,{children:[i&&e.jsx(C,{align:"center",as:"h2",marginBottom:"1",size:"h3",children:t.title}),n&&e.jsx(U,{className:Be,align:"center",marginX:"auto",marginY:"none",size:"p2",weight:"regular",children:t.description})]})})}function we({blogSectionFields:t,posts:n}){return e.jsxs(g,{marginTop:{mobile:"1.25",desktop:"4"},marginBottom:"8",children:[e.jsx(Ee,{...t}),e.jsx(te,{gap:"2",collapseBelow:"tablet",marginTop:"3",children:n.map(i=>e.jsx(ne,{width:"1/3",children:e.jsx(de,{...i,variant:"promo"})},i.title))}),e.jsx(j,{justifyContent:"center",marginTop:"3",children:e.jsx(R,{as:ce,href:"/blog",children:e.jsx(M,{iconAfter:"arrow-right",variant:"secondary",children:"Lees meer blogs"})})})]})}var D="_1ju7i1z0",X="_1ju7i1z1",Y="_1ju7i1z2";const _e="575px",L=t=>{var i,o,r,s,l,a;const{mainTitle:n}=t;return e.jsxs(g,{className:D,children:[e.jsx(j,{className:X,alignItems:{mobile:"top",desktop:"center"},fullHeight:!0,marginX:{mobile:"1.25",desktop:"8"},marginTop:{mobile:"6",desktop:"none"},children:e.jsx(C,{as:"h1",className:Y,color:"light",marginBottom:"none",children:n})}),e.jsx($,{urlSmall:((r=(o=(i=t.mobileMedia)==null?void 0:i.fields)==null?void 0:o.file)==null?void 0:r.url)??t.media.fields.file.url,urlMedium:((a=(l=(s=t.tabletMedia)==null?void 0:s.fields)==null?void 0:l.file)==null?void 0:a.url)??t.media.fields.file.url,urlLarge:t.media.fields.file.url,"aria-label":t.media.fields.description??"",height:_e,includeDarkOverlay:!0})]})},ze="675px",Pe=t=>{var i,o,r,s,l,a;const{mainTitle:n}=t;return e.jsxs(g,{className:D,children:[e.jsx(j,{className:X,alignItems:{mobile:"top",desktop:"center"},fullHeight:!0,marginX:{mobile:"1.25",desktop:"8"},marginTop:{mobile:"6",desktop:"none"},children:e.jsx(C,{as:"h1",className:Y,color:"light",children:n})}),e.jsx($,{urlSmall:((r=(o=(i=t.mobileMedia)==null?void 0:i.fields)==null?void 0:o.file)==null?void 0:r.url)??t.media.fields.file.url,urlMedium:((a=(l=(s=t.tabletMedia)==null?void 0:s.fields)==null?void 0:l.file)==null?void 0:a.url)??t.media.fields.file.url,urlLarge:t.media.fields.file.url,"aria-label":t.media.fields.description??"",height:ze,includeDarkOverlay:!0})]})};function O(t,n){const[i,o]=f.useState(t);return f.useEffect(()=>{const r=setTimeout(()=>{o(t)},n);return()=>{clearTimeout(r)}},[t,n]),i}var Ve="_8nuk2c0",He="_8nuk2c1",Ie="_8nuk2c2";const Fe=({maxCashback:t})=>e.jsxs(j,{className:Ve,paddingX:"1.25",paddingY:"0.75",gap:"0.5",children:[e.jsx(w,{icon:"discount",color:"light",fontSize:22,className:He}),e.jsxs(_,{className:Ie,"data-testid":"discount-label",children:[e.jsx(u,{color:"light",size:"large",children:"Tot"}),e.jsx(u,{color:"light",weight:"heavy",size:"xxlarge",children:Te(t,{maximumFractionDigits:2,minimumFractionDigits:2})}),e.jsx(u,{color:"light",size:"large",children:"Korting"})]})]});var Le="nydzsr0",Oe="nydzsr1",Ae="nydzsr2",Ue="nydzsr3",Re="nydzsr4",E="nydzsr5",Me="nydzsr6";const $e=ue({postCode:F().min(1,{message:"Postcode is verplicht"}).regex(/^[1-9][0-9]{3} ?[A-Z]{2}$/i,{message:"Ongeldige postcode"}).transform(t=>t.replace(/\s/g,"").toUpperCase()),houseNumber:he.number().positive({message:"Ongeldig huisnummer"}),addition:F().optional(),skipValidation:ge().optional()}),De="/signup/type-of-home",A=300,Xe="Bereken nu";function Ye(t){const{postCode:n,houseNumber:i,addition:o,skipValidation:r}=t,s={"address.zipCode":n,"address.number":String(i)};o&&(s["address.addition"]=o),r&&(s["address.skipValidation"]="true");const l=new URLSearchParams(s).toString(),a=`${De}?${l}`;be("address_details"),Z("main",a)}const V=({title:t,buttonText:n=Xe,reviewsStatistics:i,maxCashback:o})=>{const[r,s]=f.useState([]),{handleSubmit:l,control:a,setValue:c,watch:h,formState:{isValid:b}}=xe({mode:"onChange",resolver:fe($e),defaultValues:{postCode:"",houseNumber:"",addition:"",ski
1pValidation:!1}}),[S,B,k]=h(["postCode","houseNumber","skipValidation"]),P=O(S,A),v=O(B,A),{data:d,isSuccess:p,isError:m}=ke({zipcode:P,houseNr:v},{skip:!b});f.useEffect(()=>{var T,N;if(p&&((T=d==null?void 0:d.additions)!=null&&T.length)&&((N=d==null?void 0:d.additions)==null?void 0:N.length)>0){const W=d.additions.map(I=>({value:I,display:I}));s(W)}else s([])},[p,d]),f.useEffect(()=>{var N;const T=(N=r[0])==null?void 0:N.value;T&&c("addition",T,{shouldValidate:!0})},[r]),f.useEffect(()=>{p&&c("skipValidation",!1)},[p]);const x=b&&m,G=(p||k)&&b,K=x||k;return e.jsxs(_,{padding:"2",className:Le,marginBottom:"2",marginX:"auto",children:[o!==null&&e.jsx(Fe,{maxCashback:o}),e.jsx(C,{as:"h2",size:"h4",children:t}),e.jsxs(oe,{as:"form",onSubmit:l(Ye),gap:{desktop:"1.25"},className:Ae,columnCount:{desktop:4,mobile:1},children:[e.jsx(y.InputField,{name:"postCode",control:a,placeholder:"Postcode",label:"Postcode",className:E}),e.jsx(y.InputField,{name:"houseNumber",control:a,placeholder:"Huisnummer",label:"Huisnummer",type:"number",className:E}),k?e.jsx(y.InputField,{name:"addition",control:a,placeholder:"Toevoeging",label:"Toevoeging",className:E}):e.jsx(y.SelectField,{name:"addition",control:a,placeholder:"Toevoeging",label:"Toevoeging",background:"primary",options:r,disabled:r.length===0,className:E}),K&&e.jsxs(j,{className:Oe,marginBottom:{mobile:"2",desktop:"none"},children:[e.jsx(y.CheckboxField,{name:"skipValidation",control:a,label:e.jsx(u,{children:"Vul adres handmatig in"}),"aria-label":"Vul adres handmatig in",marginRight:"0.5"}),e.jsx(ie,{children:"Klopt je adres niet? Selecteer een van de aangegeven opties. Staat het juiste adres er niet tussen, bijvoorbeeld in het geval van nieuwbouw? Vink dan hieronder aan dat je je adres handmatig in wil voeren."})]}),e.jsx(M,{iconAfter:"arrow-right",disabled:!G,className:Me,children:n})]}),i&&e.jsxs(_,{className:Ue,alignItems:{mobile:"left",desktop:"center"},justifyContent:"between",marginTop:{mobile:"2",desktop:"1"},children:[e.jsxs(R,{href:"https://vandebron.nl/klantenservice/ervaringen",marginTop:{mobile:"0.5",desktop:"none"},children:[je(i.totalScore,1)," via klantenvertellen.nl"]}),e.jsx(se,{rating:ve(i.totalScore),marginTop:{mobile:"0.5",desktop:"none"},marginBottom:{mobile:"2",desktop:"none"}}),e.jsxs(_,{className:Re,alignItems:{mobile:"left",desktop:"center"},gap:{mobile:"2",desktop:"1"},children:[e.jsxs(u,{children:[e.jsx(w,{icon:"check",inline:!0,color:"affirmative"})," ",i.percentageRecommendUs,"% beveelt ons aan"]}),e.jsxs(u,{children:[e.jsx(w,{icon:"check",inline:!0,color:"affirmative"})," 100% groene NL stroom"]}),e.jsxs(u,{children:[e.jsx(w,{icon:"check",inline:!0,color:"affirmative"})," Persoonlijk contact"]})]})]})]})};var H="_7ezz380";const Ge="panelTitle",Ke="signupPanelTitle",We="mainTitle",qe=({header:t,reviewsStatistics:n,maxCashback:i})=>{var c;const{fields:o}=t;if(Ge in o)return e.jsxs(e.Fragment,{children:[e.jsx(Pe,{...o}),e.jsx(z,{className:H,children:e.jsx(V,{title:o.panelTitle,buttonText:o.panelButtonText,reviewsStatistics:n,maxCashback:i})})]});if(Ke in o)return e.jsxs(e.Fragment,{children:[e.jsx(L,{...o}),e.jsx(z,{className:H,children:e.jsx(V,{title:o.signupPanelTitle,buttonText:o.signupPanelCta,reviewsStatistics:n,maxCashback:i})})]});if(We in o)return e.jsxs(e.Fragment,{children:[e.jsx(L,{...o}),e.jsx(z,{className:H,children:e.jsx(V,{title:o.mainTitle,buttonText:(c=o.mainTitleCta)==null?void 0:c.buttonText,reviewsStatistics:n,maxCashback:i})})]});const a=new Error("Unhandled header content model in ContentPage");return pe({error:a}),null};function Qe({fields:t,faqs:n,blogPosts:i,reviewsStatistics:o,maxCashback:r}){const{blogsSection:s,header:l,content:a}=t;return e.jsxs(g,{children:[e.jsx(qe,{header:l,reviewsStatistics:o,maxCashback:r}),e.jsxs(z,{children:[e.jsx(Se,{content:a}),s&&e.jsx(we,{blogSectionFields:s,posts:i})]}),e.jsx(me,{faqs:n})]})}const St=({loaderData:t})=>{var c,h;const{fields:n}=(t==null?void 0:t.contentpage)||{};if(!n)return[{title:"Vandebron"}];const i=n.metaTitle||`${n.title} - Vandebron`,o=n.metaDescription,r=n.route,s=n.metaOgUrl||J("main",`${r}`),l=[{title:n.title},{property:"og:title",content:i},{property:"twitter:card",content:"summary"},{property:"twitter:title",content:i},{tagName:"link",rel:"canonical",href:s},{property:"og:url",content:s}];o&&l.push({name:"description",content:o},{property:"og:description",content:o}),n.noindex&&l.push({name:"robots",content:"noindex"});const a=(h=(c=n.metaOgImage)==null?void 0:c.fields)==null?void 0:h.file;return a&&(l.push({property:"og:image",content:`https:${a.url}`}),l.push({property:"og:image:type",content:a.contentType})),l},Bt={...Ne("light")},Et=q(function(){const{contentpage:t,faqs:n,blogPosts:i,reviewsStatistics:o,maxCashback:r}=Q();return e.jsx(Qe,{...t,faqs:n,blogPosts:i,reviewsStatistics:o,maxCashback:r})});
1export{Et as default,Bt as handle,St as meta};

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.