PageSourceSearch

https://www.ecotricity.co.uk/component---src-templates-business-index-tsx-ad57e733ef3a50e021ee.js

js ecotricity.co.uk collected 2026-10-02 02:18:42 UTC 6,467 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunkecotricity=self.webpackChunkecotricity||[]).push([[2781],{89:function(e,n,i){i.r(n),i.d(n,{default:function(){return h}});var t=i(3343),r=i(1501),a=i(6835),o=i(3614),d=i(9509),l=i(1524),c=i(243);var s=({servicesHeading:e,servicesLinks:n,actionsHeading:i,actionsLinks:t})=>{const r={marginTop:[0,null,"-9rem"],marginBottom:[0,14],zIndex:1,display:"flex",flexDirection:"column"},s={paddingY:5,paddingX:9,marginBottom:9,borderRadius:"0.5rem",fontWeight:"bold",backgroundColor:"text",color:"background",minHeight:"6rem"},p={sx:{overflow:"visible",alignItems:"stretch"},gap:11,flexGrow:1,flexBasis:["10rem",0],flexWrap:["wrap","nowrap"]},u={display:"flex",flexDirection:"column",justifyContent:"center",height:"100%",fontSize:1,textAlign:"center",padding:[12,10,10,12],paddingBottom:["6rem","6rem","6rem","6rem","6rem"],backgroundColor:"background",backgroundImage:`url(${l.A})`,backgroundRepeat:"no-repeat",backgroundPosition:"center bottom 2.5rem",backgroundSize:"2rem",borderRadius:"0.5rem",boxShadow:"card"},g={display:["none","block"],flexBasis:0,marginTop:13,paddingX:9,textAlign:"center"},m={renderNode:{[d.nA.PARAGRAPH]:(e,n)=>(0,d.Vs)(e)&&(0,c.Y)(a.EY,{as:"p",variant:"intro",children:n})}},v=null==n?void 0:n.map((e,n)=>{var i;const t=(null===(i=e.body)||void 0===i?void 0:i.raw)&&JSON.parse(e.body.raw),r=(t.content&&t.content.find(d.DN)).content[1].data.uri;return(0,c.Y)(a.N_,{sx:u,href:r,variant:"label",children:e.title},n)}),h=null==n?void 0:n.map((e,n)=>(0,c.Y)(a.az,{sx:g,children:e.body&&(0,d.CA)(e.body,m)},n)),x=null==t?void 0:t.map((e,n)=>{var i;const t=(null===(i=e.body)||void 0===i?void 0:i.raw)&&JSON.parse(e.body.raw),r=t.content&&t.content.find(d.DN),o=null==r?void 0:r.content[1].data.uri;return(0,c.Y)(a.N_,{sx:u,href:o,variant:"label",children:e.title},n)}),b=null==t?void 0:t.map((e,n)=>(0,c.Y)(a.az,{sx:g,children:e.body&&(0,d.CA)(e.body,m)},n));return(0,c.FD)(a.so,{sx:{flexDirection:["column",null,"row"],paddingY:14},children:[(0,c.FD)(a.az,{sx:r,children:[(0,c.Y)(a.EY,{sx:s,variant:"head",children:e}),(0,c.Y)(o.cV,{...p,children:v}),(0,c.Y)(o.cV,{...p,children:h})]}),(0,c.Y)(a.az,{sx:{display:["none","block"],marginLeft:12,borderLeft:"muted",borderWidth:"0.5rem",paddingLeft:12}}),(0,c.FD)(a.az,{sx:r,children:[(0,c.Y)(a.EY,{sx:s,variant:"head",children:i}),(0,c.Y)(o.cV,{...p,children:x}),(0,c.Y)(o.cV,{...p,children:b})]})]})},p=i(7880);var u=({strapline:e})=>(0,c.Y)(a.EY,{sx:{position:"relative",paddingY:16,width:"72%",marginX:"auto",textAlign:"center",display:"block"},variant:"lrg",children:e}),g=i(9308),m=i(1783),v=i(7797);var h=({data:{business:e={},topic:n={},related:i={}},location:a})=>{var o;const d=null===(o=e.sections)||void 0===o?void 0:o.map((e,n)=>{var t,o;switch(null==e?void 0:e.__typename){case"ContentfulBusinessHero":return(0,c.Y)(r.A,{as:"div",pos:n,variant:"wide",children:(0,c.Y)(s,{servicesHeading:e.servicesHeading,servicesLinks:null===(t=e.servicesLinks)||void 0===t?void 0:t.map(e=>({title:null==e?void 0:e.title,body:null==e?void 0:e.body})),actionsHeading:e.actionsHeading,actionsLinks:null===(o=e.actionsLinks)||void 0===o?void 0:o.map(e=>({title:null==e?void 0:e.title,body:null==e?void 0:e.body}))})},n);case"ContentfulStrapline":return(0,c.Y)(r.A,{as:"div",pos:n,fill:"sprayNESW",variant:"wide",children:(0,c.Y)(u,{strapline:e.strapline})},n);case"ContentfulItem":return(0,c.Y)(r.A,{pos:n,variant:"index",children:(0,c.Y)(p.A,{title:e.title,items:[{body:e.body,image:e.image,video:e.video}],flip:Boolean(1&n),variant:"index"})},n);case"ContentfulGeneralContent":{const i="Cluster"===e.type[0]?{cols:Math.min(Math.max(e.items.length,2),4),variant:"support"}:"Quick Links"===e.type[0]?{maxLinkCount:0===n?3:void 0}:"Support"===e.type[0]?{location:a,headingAs:"h2",headingVariant:"lrg"}:{};return(0,c.Y)(r.A,{pos:n,fill:e.fill,variant:"index",children:(0,c.Y)(v.A,{...e,params:i})},n)}case"ContentfulRelatedPages":{var d;const t=e.pages||[],a=i.nodes||[];return(0,c.Y)(r.A,{pos:n,variant:"index",children:(0,c.Y)(m.A,{title:e.title,items:null===(d=[...t,...a])||void 0===d?void 0:d.map(e=>({title:null==e?void 0:e.title,image:null==e?void 0:e.image,text:null==e?void 0:e.description,page:e})),variant:"index"})},n)}case"ContentfulJoinUs":return(0,c.Y)(r.A,{pos:n,variant:"index",children:(0,c.Y)(g.A,{heading:e.heading})},n);default:return null}});return(0,c.Y)(t.A,{page:{...e,topic:n},masthead:"business",children:d})}},5456:function(e,n,i){var t=i(6835),r=i(9394),a=i(4361),o=i(243);n.A=({isHomepage:e,alt:n,...i})=>
1{const d=(0,r.A)(),l=(0,a.A)(),c={display:"grid",gridTemplateColumns:"2fr 1fr",marginTop:e?"32px":["30px","45px"],borderRadius:"10px",overflow:"hidden",maxWidth:[null,"660px",null],border:"solid 1px",borderColor:e?"text":"contrast"},s={backgroundColor:n?"background":"muted",borderRadius:0,paddingInline:"20px",paddingBlock:e?["14px","17px","20px"]:"20px",fontSize:["14px",null,"16px"],lineHeight:e?1.5:1.7,border:"none",borderRight:"solid 1px",borderColor:e?"text":"contrast"},p={display:"block",borderRadius:0,textAlign:"center",paddingInline:"20px",paddingBlock:e?["14px","17px","20px"]:"20px",fontSize:["14px",null,"16px"],fontWeight:700,border:"none",gridArea:"1 / 2 / 1 / 2",transition:"background-color 0.2s linear, color 0.2s linear",minWidth:"10em","&:hover":{backgroundColor:"text",color:"background"}};return(0,o.Y)(t.az,{...i,children:(0,o.Y)(function(){return(0,o.FD)("form",{sx:c,action:"https://my.ecotricity.co.uk/ecotricityinlife/s/getaquote",children:[(0,o.Y)(t.pd,{sx:s,name:"postcode",placeholder:"Enter your postcode"}),l&&(0,o.FD)(o.FK,{children:[(0,o.Y)(t.pd,{type:"hidden",name:"partnercode",value:l.partner}),(0,o.Y)(t.pd,{type:"hidden",name:"clickid",value:l.clickid}),(0,o.Y)(t.pd,{type:"hidden",name:"wgu",value:l.wgu||""}),(0,o.Y)(t.pd,{type:"hidden",name:"wgexpiry",value:l.wgexpiry||""})]}),(null==d?void 0:d.code)&&(0,o.Y)(t.pd,{type:"hidden",name:"partnercode",value:d.code}),(0,o.Y)(t.$n,{sx:p,type:"submit",variant:"primary",children:"Get a quote"})]})},{})})}},9308:function(e,n,i){var t=i(6835),r=i(5456),a=i(243);n.A=({heading:e})=>(0,a.FD)(t.az,{children:[(0,a.Y)(t.EY,{as:"blockquote",sx:{fontSize:5,fontWeight:"bold",fontStyle:"italic",lineHeight:"heading",textAlign:"center",maxWidth:"60rem",marginX:"auto",marginY:16},children:e}),(0,a.Y)(r.A,{sx:{maxWidth:"35rem",marginX:"auto",textAlign:"center"}})]})}}]);
2//# sourceMappingURL=component---src-templates-business-index-tsx-ad57e733ef3a50e021ee.js.map

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.