1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="85abcd58-1d74-4f4a-915f-1004628fe223",e._sentryDebugIdIdentifier="sentry-dbid-85abcd58-1d74-4f4a-915f-1004628fe223")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9156],{9084:(e,t,a)=>{"use strict";a.d(t,{Kr:()=>r,rf:()=>i});var l=a(60361),n=a(92068);function r(){let[e]=(0,l.A)("utmSalesChannel"),[t]=(0,l.A)("utmSalesSubchannel"),[a]=(0,l.A)("utmCampaign");return e||t||a?{campaign:a||"",salesChannel:e||n.me.DIRECT,salesSubchannel:t||n.WB.ORGANIC.toUpperCase()}:{campaign:"",salesChannel:n.me.DIRECT.toUpperCase(),salesSubchannel:n.WB.ORGANIC.toUpperCase()}}function i(){return r().salesSubchannel}},10569:(e,t,a)=>{"use strict";a.d(t,{J:()=>n});var l=a(83067);let n=l.Ik({withBattery:l.zM(),withCarCharger:l.zM(),withSolarWallet:l.zM()})},14517:(e,t,a)=>{"use strict";a.d(t,{d:()=>i});var l=a(48083),n=a(51004),r=a(64255);let i=e=>{let{ariaLabelledBy:t}=e,{id:a,disabled:i,checked:s,name:o,onBlur:c,onChange:d,error:u,errorMessage:m}=(0,n.l)(),h=u&&m?(0,l.m)(m):void 0;return(0,r.jsxs)("span",{"data-part":"switch-checkbox-group",children:[(0,r.jsx)("input",{"data-part":"switch-input","aria-labelledby":t,"aria-describedby":h,role:"switch","aria-checked":s,checked:s,type:"checkbox",id:a,name:o,onBlur:c,onChange:d,disabled:i}),(0,r.jsx)("span",{"data-part":"switch-handle","data-testid":"switch__handle"}),(0,r.jsx)("span",{"data-part":"switch-track","data-testid":"switch__track"})]})}},15014:(e,t,a)=>{"use strict";a.d(t,{m:()=>r});var l=a(63781),n=a(41695);let r=e=>{let{onValuesChange:t}=e,{values:a}=(0,l.j7)(),r=(0,n.useEffectEvent)(t);return(0,n.useEffect)(()=>{r(a)},[a]),null}},24200:(e,t,a)=>{"use strict";a.d(t,{dO:()=>p});var l=a(19866),n=a(66504),r=a(51004),i=a(2486),s=a(94502);let o=(0,s.z)("switch",{behaviour:"switch",theme:"tertiary500"},[{behaviour:"switch",theme:"tertiary500",css:{'& [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.track.color}"},'& [data-part="switch-label"]':{color:"{components.switch.tertiary500.label.color}",_trulyDisabled:{color:"{components.switch.tertiary500.label.disabledColor}"}},'& [data-part="switch-input"]':{_disabled:{'& ~ [data-part="switch-handle"]':{color:"{components.switch.tertiary500.handle.disabledColor}"},'& ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.track.disabledColor}"}},'&:checked ~ [data-part="switch-handle"]':{color:"{components.switch.tertiary500.handle.checkedColor}"},'&:checked ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.track.checkedColor}"}}}},{behaviour:"switch",theme:"secondary500",css:{'& [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.track.color}"},'& [data-part="switch-label"]':{color:"{components.switch.secondary500.label.color}",_trulyDisabled:{color:"{components.switch.secondary500.label.disabledColor}"}},'& [data-part="switch-input"]':{_disabled:{'& ~ [data-part="switch-handle"]':{color:"{components.switch.secondary500.handle.disabledColor}"},'& ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.track.disabledColor}"}},'&:checked ~ [data-part="switch-handle"]':{color:"{components.switch.secondary500.handle.checkedColor}"},'&:checked ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.track.checkedColor}"}}}},{behaviour:"toggle",theme:"tertiary500",css:{'& [data-part="switch-handle"]':{color:"{components.switch.tertiary500.toggle.handleColor}"},'& [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.toggle.trackBackgroundColor}"},'& [data-part="switch-label"]':{color:"{components.switch.tertiary500.label.color}",_trulyDisabled:{color:"{components.switch.tertiary500.label.disabledColor}"}},'& [data-part="switch-input"]':{_disabled:{'& ~ [data-part="switch-handle"]':{color:"{components.switch.tertiary500.handle.disabledColor}"},'& ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.track.disabledColor}"}},'&:checked ~ [data-part="switch-handle"]':{color:"{components.switch.tertiary500.handle.checkedColor}"},'&:checked ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.tertiary500.track.checkedColor}"}}}},{behaviour:"toggle",theme:"secondary500",css:{'& [data-part="switch-handle"]':{color:"{components.switch.secondary500.toggle.handleColor}"},'& [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.toggle.trackBackgroun
1dColor}"},'& [data-part="switch-label"]':{color:"{components.switch.secondary500.label.color}",_trulyDisabled:{color:"{components.switch.secondary500.label.disabledColor}"}},'& [data-part="switch-input"]':{_disabled:{'& ~ [data-part="switch-handle"]':{color:"{components.switch.secondary500.handle.disabledColor}"},'& ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.track.disabledColor}"}},'&:checked ~ [data-part="switch-handle"]':{color:"{components.switch.secondary500.handle.checkedColor}"},'&:checked ~ [data-part="switch-track"]':{backgroundColor:"{components.switch.secondary500.track.checkedColor}"}}}}]),c={behaviour:["toggle","switch"],theme:["tertiary500","secondary500"]},d=Object.keys(c),u=Object.assign((0,i.ph)(o.recipeFn),{__recipe__:!0,__name__:"StyledSwitch",__getCompoundVariantCss__:o.__getCompoundVariantCss__,raw:e=>e,variantKeys:d,variantMap:c,merge(e){return(0,s.q)(this,e)},splitVariantProps:e=>(0,i.rg)(e,d),getVariantProps:o.getVariantProps});var m=a(41695),h=a(64255);let p=e=>{let{id:t,children:a,checked:i,disabled:s,error:o,errorMessage:c,name:d,onBlur:p,onChange:f,behaviour:x,theme:v}=(0,l.Y)({props:e,defaultProps:g}),b=(0,m.useId)(),[j,w]=(0,m.useState)(i??!1);return(0,m.useEffect)(()=>{void 0!==i&&w(i)},[i]),(0,h.jsxs)("div",{className:u({behaviour:x,theme:v}),"data-part":"switch-root",children:[(0,h.jsx)(r.g.Provider,{value:{id:t||b,disabled:s,checked:i,onBlur:p,onChange:e=>{w(!j),f?.(e,e.currentTarget.checked)},name:d,error:o,errorMessage:c},children:a}),o&&(0,h.jsx)(n.K,{message:c})]})},g={disabled:!1,error:!1}},35196:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>t3,default:()=>t4});var l,n,r,i,s,o,c,d,u,m,h,p,g,f,x,v,b,j,w,y,S,C,E,A,M,F,k,P,_,B,I,D,z,O,W,N,T,H,L,q,J,R,U,V,Y,Z,$,G,K,X,Q,ee,et,ea,el,en,er,ei,es,eo,ec,ed,eu,em,eh,ep,eg,ef,ex,ev,eb,ej,ew=a(64255),ey=a(11164),eS=a(11004),eC=a(80262),eE=a(61539),eA=a(41695),eM=a(2318),eF=a(76878),ek=a(85633),eP=a(14828),e_=a(46727),eB=a(40477),eI=a(54714),eD=a(45601);let ez=(0,a(342).U)("\n mutation CalculateSolarEstimate($input: CalculateSolarEstimateInput!) {\n calculateSolarEstimate(input: $input) {\n numberOfPanels\n panelPower\n panelPowerUnit\n totalPower\n totalPowerUnit\n totalPanelPrice\n batteryPrice\n chargerPrice: evChargerPrice\n priceUnit\n governmentSubsidiesMultiplier: multiplierGovernmentSubsidies\n co2Emissions: co2SavingsEquivalents {\n carKms: carKmsSaved\n treesPlanted\n flightsAvoided\n }\n postInstallationMultipliers: monthlySavingsMultipliers {\n basicInstallation\n withBattery\n withSolarWallet\n withBatteryAndSolarWallet\n }\n twentyFiveYearSavingsMultipliers {\n basicInstallation\n withBattery\n withSolarWallet\n withBatteryAndSolarWallet\n }\n }\n }\n");var eO=a(59475),eW=a(44449),eN=a(37652),eT=a(55052),eH=a(48567),eL=a(75174),eq=a(13520),eJ=a(48210),eR=a(82896),eU=a(62069),eV=a(19612),eY=a(89824),eZ=a(79736);let e$=e=>{let{variant:t=(0,eZ.S)("colors.background.secondary.500"),variant2:a=(0,eZ.S)("colors.background.base.100"),width:l=26,height:n=26}=e,{formatMessage:r}=(0,eM.A)();return(0,ew.jsxs)("svg",{width:l,height:n,viewBox:"0 0 ".concat(l," ").concat(n),fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ew.jsx)("title",{id:"title-check-circle-icon",children:"".concat(r({id:"icon.checkCircle.info",defaultMessage:"Icono de un check con c\xedrculo"}))}),(0,ew.jsxs)("g",{clipPath:"url(#clip0_507_2897)",children:[(0,ew.jsx)("path",{d:"M13 26C20.18 26 26 20.18 26 13C26 5.82 20.18 0 13 0C5.82 0 0 5.82 0 13C0 20.18 5.82 26 13 26Z",fill:t}),(0,ew.jsx)("path",{d:"M11.95 16.82C11.63 17.14 11.12 17.14 10.8 16.82L7.55 13.57C7.23 13.26 7.23 12.74 7.55 12.43C7.87 12.11 8.38 12.11 8.7 12.43L11.37 15.1L17.3 9.18C17.62 8.86 18.13 8.86 18.45 9.18C18.77 9.49 18.77 10.01 18.45 10.32L11.95 16.82Z",fill:a})]}),(0,ew.jsx)("defs",{children:(0,ew.jsx)("clipPath",{id:"clip0_507_2897",children:(0,ew.jsx)("rect",{width:n,height:n,fill:a})})})]})};function eG(){return(eG=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let eK=function(e){return eA.createElement("svg",eG({xmlns:"http://www.w3.org/2000/svg",width:62,height:53,fill:"none"},e),l||(l=eA.createElement("g",{clipPath:"url(#solar-wallet-icon_svg__a)"},eA.createElement("path",{fill:"#5840FF",d:"M38.224 18.544 3.657 25.576c-.26.053-.489.201-.643.416-.15.165-1.314 1.471-1.258 2.341.061.93 1.104-.064 1.104-.064l.223-.241 4.364 21.457a1.05 1.05 0 0 0 1.24.82l34.567-7.03a1.05 1.05 0 0 0 .821-1.24l-4.611-22.67a1.05 1.05 0 0 0-1.24-.82"}),eA.createElement("path",{fill:"#F050F8",d:"m38.673 29.829-5.192-15.176a1.63 1.63 0 0 0-2.068-1.013L4.925 22.698a1.63 1.63 0 0 0-1.014 2.068L9.103 39.94a1.63 1.63 0 0 0 2.069 1.014l26.487-9.058a1.63 1.63 0 0 0 1.014-2.068"}),eA.createElement("path",{fill:"#FFA26B",d:"m38.88 16.519-27.93 1.897a1.63 1.63 0 0 0-1.515 1.735l1.085 16.002c.06.898.838 1.576 1.736 1.515l27.929-1.897a1.63 1.63 0 0 0 1.515-1.736l-1.085-16.002a1.63 1.63 0 0 0-1.735-1.514"}),eA.createElement("path",{fill:"azure",d:"m17.687 21.418-5.5.374.312 4.597 5.5-.374zM38.679 27.702l-25.93 1.761.16 2.356 25.93-1.761zM19.746 32.471l-6.762.46.046.688 6.763-.46zM38.895 31.168l-17.239 1.171.047.689 17.239-1.172z"}
1),eA.createElement("path",{fill:"#00C8F8",d:"M32.614 24.313a1.986 1.986 0 1 0-.791-3.893 1.986 1.986 0 0 0 .79 3.893"}),eA.createElement("path",{fill:"#5840FF",d:"M36.976 22.043a1.987 1.987 0 1 1-3.964.268 1.987 1.987 0 0 1 3.964-.268"}),eA.createElement("path",{fill:"#6675F6",d:"M33.689 23.676a1.983 1.983 0 0 1-.201-2.793l.038-.02s1.268 1.302.162 2.813"}),eA.createElement("path",{fill:"#6675F6",d:"M37.145 20.382 2.578 27.414c-.569.116-.937.67-.82 1.24l4.61 22.67c.116.568.672.936 1.24.82l34.568-7.032c.569-.116.936-.67.82-1.24l-4.61-22.67a1.05 1.05 0 0 0-1.241-.82"}),eA.createElement("path",{fill:"#2D19BE",d:"M41.334 28.576s.48 1.908-1.474 2.348l-2.014.435-6.02 1.225a1.82 1.82 0 0 0-1.422 2.146 1.82 1.82 0 0 0 2.147 1.421l6.021-1.225s3.198-.442 3.663-1.633c.673-1.726-.901-4.717-.901-4.717",opacity:.3}),eA.createElement("path",{fill:"#2D19BE",d:"M41.45 29.15s.48 1.909-1.473 2.349l-2.014.435-6.02 1.225a1.82 1.82 0 0 0-1.422 2.146 1.82 1.82 0 0 0 2.147 1.42l6.021-1.224s3.198-.442 3.663-1.633c.673-1.726-.901-4.717-.901-4.717",opacity:.3}),eA.createElement("path",{fill:"#6675F6",d:"M41.392 28.863s.48 1.908-1.474 2.348l-2.013.435-6.021 1.225a1.82 1.82 0 0 0-1.422 2.147 1.82 1.82 0 0 0 2.147 1.42l6.021-1.225s3.199-.442 3.663-1.633c.674-1.726-.901-4.717-.901-4.717"}),eA.createElement("path",{fill:"#FFA26B",d:"M33.075 35.774a1.223 1.223 0 1 0-.487-2.396 1.223 1.223 0 0 0 .487 2.396"}))),n||(n=eA.createElement("path",{stroke:"#949FFF",strokeDasharray:"3 3",strokeLinecap:"round",strokeLinejoin:"round",d:"M36.767 22.002 3.254 28.819l4.423 21.747 33.44-6.803z"})),r||(r=eA.createElement("path",{fill:"#FFA26B",d:"M44.053 10.998A9.183 9.183 0 0 1 52.123.823c5.037-.581 7.632 3.506 8.214 8.544.581 5.038-1.071 9.119-6.11 9.7a9.183 9.183 0 0 1-10.174-8.069"})),i||(i=eA.createElement("defs",null,eA.createElement("clipPath",{id:"solar-wallet-icon_svg__a"},eA.createElement("path",{fill:"#fff",d:"M0 20.016 39.403 12l6.578 32.338-39.403 8.015z"})))))};var eX=a(78365);function eQ(){return(eQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let e0=function(e){return eA.createElement("svg",eQ({xmlns:"http://www.w3.org/2000/svg",width:53,height:53,fill:"none"},e),s||(s=eA.createElement("path",{fill:"#FFBAFF",d:"M35.021 4.041H18.186a4.493 4.493 0 0 0-4.493 4.493v39.034a4.493 4.493 0 0 0 4.493 4.492H35.02a4.493 4.493 0 0 0 4.493-4.492V8.534A4.493 4.493 0 0 0 35.02 4.04"})),o||(o=eA.createElement("path",{fill:"#F484FA",d:"M35.142 52.06h-3.06s3.627-1.474 3.718-4.559V8.128c0-3.45-3.718-4.087-3.718-4.087h3.06a4.374 4.374 0 0 1 4.372 4.373v39.27a4.374 4.374 0 0 1-4.373 4.372zM20.562 4.041V2.315c0-.882.92-1.599 2.058-1.599h8.07c1.135 0 2.058.717 2.058 1.599V4.04H20.562"})),c||(c=eA.createElement("path",{fill:"azure",d:"M28.475 17.18 20.434 28.42c-.17.236 0 .56.29.56h5.942c.248 0 .418.248.33.48l-2.856 7.593c-.145.39.377.667.621.332l8.112-11.296a.353.353 0 0 0-.294-.559l-5.437.07a.354.354 0 0 1-.344-.455l2.307-7.656c.116-.385-.394-.633-.63-.306z"})))};function e1(){return(e1=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let e2=function(e){return eA.createElement("svg",e1({xmlns:"http://www.w3.org/2000/svg",width:48,height:49,fill:"none"},e),d||(d=eA.createElement("path",{fill:"#6018C8",d:"M44.565 17.805h-.136a2.493 2.493 0 0 0-2.494 2.493v6.14a2.493 2.493 0 0 0 2.494 2.493h.136a2.493 2.493 0 0 0 2.493-2.493v-6.14a2.493 2.493 0 0 0-2.493-2.493M15.591 17.805h-1.755c-.93 0-1.684.753-1.684 1.683v7.76c0 .93.754 1.683 1.684 1.683h1.755c.93 0 1.684-.753 1.684-1.683v-7.76c0-.93-.754-1.683-1.684-1.683"})),u||(u=eA.createElement("path",{fill:"#F050F8",d:"M14.396 9.35s2.22-5.89 3.61-7.373S22.013 0 24.269 0h12.316c1.111 0 2.365.344 3.34 1.025.83.58 1.697 1.49 2.35 2.916 1.74 3.797 2.958 6.978 3.524 8.153s1.784 1.655 1.827 3.36c.036 1.462-.05 3.117-.465 4.628a13 13 0 0 0-.359 1.784l-.243 1.992a1.45 1.45 0 0 1-1.44 1.276H14.044c-.723 0-1.34-.538-1.432-1.254l-.359-2.594a8 8 0 0 0-.215-1.024c-.272-.996-.852-3.332-.644-4.679.258-1.74 2.65-4.45 3.002-6.233"})),m||(m=eA.createElement("path",{fill:"#fff",d:"M15.025 9.242s18.987 1.698 28.967 0c0 0-2.429-6.856-5.023-7.98C36.069 0 22.727.737 22.727.737s-3.274.193-4.313 1.698-3.389 6.806-3.389 6.806"})),h||(h=eA.createElement("path",{fill:"#CCC",d:"M34.341 9.988s5.997-.094 9.65-.746L22.936.724s-3.468.129-4.52 1.712z",opacity:.18})),p||(p=eA.createElement("path",{fill:"#CD23DB",d:"m44.364 8.733.265.638s2.615.33 3.167-.781-.193-1.54-.587-1.634-1.677-.308-2.186.194c-.272.272-.308.68-.207 1.153a.342.342 0 0 1-.294.416l-.158.021zM14.66 8.662l-.265.68s-2.637.352-3.196-.766c-.558-1.118.194-1.54.588-1.633.394-.094 1.676-.309 2.185.193.294.294.308.752.186 1.275a.195.195 0 0 0 .187.244h.315z"})),g||(g=eA.createElement("path",{fill:"#F050F8",d:"M11.2 8.59c-.552-1.11.193-1.54.587-1.633s1.74-.323 2.185.193c.158.187-2.221 2.55-2.773 1.44M47.804 8.59c.552-1.11-.194-1.54-.588-1.633s-1.74-.323-2.185.193c-.157.187 2.221 2.55 2.773
11.44"})),f||(f=eA.createElement("path",{fill:"#F8C050",d:"M14.266 20.907v1.562c0 .315.386.473.601.243l1.483-1.562a.35.35 0 0 0-.25-.594h-1.483a.35.35 0 0 0-.351.35M44.837 20.907v1.562c0 .315-.387.473-.601.243l-1.483-1.562a.35.35 0 0 1 .25-.594h1.483c.194 0 .351.157.351.35"})),x||(x=eA.createElement("path",{fill:"#EAEAEA",d:"m39.564 13.535 2.772-1.319c.86-.408 1.942-.157 2.45.566l.395.56c.623.887.093 2.048-1.075 2.328l-3.167.759c-.831.2-1.712-.129-2.113-.78-.466-.76-.137-1.692.737-2.107zM19.589 13.535l-2.773-1.319c-.86-.408-1.941-.157-2.45.566l-.394.56c-.623.887-.093 2.048 1.075 2.328l3.166.759c.831.2 1.713-.129 2.114-.78.466-.76.136-1.692-.738-2.107z"})),v||(v=eA.createElement("path",{fill:"#FFD48F",d:"M18.594 15.985a.96.96 0 1 0 0-1.92.96.96 0 0 0 0 1.92"})),b||(b=eA.createElement("path",{fill:"#F8C050",d:"M15.799 15.203a1.318 1.318 0 1 0 0-2.637 1.318 1.318 0 0 0 0 2.637"})),j||(j=eA.createElement("path",{fill:"#FFD48F",d:"M40.46 15.955a.96.96 0 1 0 0-1.92.96.96 0 0 0 0 1.92"})),w||(w=eA.createElement("path",{fill:"#F8C050",d:"M43.254 15.182a1.318 1.318 0 1 0 0-2.637 1.318 1.318 0 0 0 0 2.637"})),y||(y=eA.createElement("path",{fill:"#CD23DB",d:"m21.667 15.676 1.124 1.913c.08.136.23.222.387.222h12.71a.46.46 0 0 0 .387-.222l1.125-1.891a.443.443 0 0 0-.38-.674l-14.96-.021a.45.45 0 0 0-.386.673zM12.618 23.93l1.49.021c1.348 0 2.63-.559 3.554-1.547l.452-.48a4.85 4.85 0 0 1 3.553-1.548h15.368a4.85 4.85 0 0 1 3.26 1.261l1.161 1.053a4.86 4.86 0 0 0 3.26 1.261l1.834-.028s-.122 1.139-1.311 1.203H14.044c-1.282 0-1.426-1.203-1.426-1.203z"})),S||(S=eA.createElement("path",{fill:"azure",d:"M0 24.271v19.585c0 2.78 2.156 5.033 4.816 5.033h24.137c2.66 0 4.816-2.254 4.816-5.033V24.27c0-2.78-2.156-5.033-4.816-5.033H4.816C2.156 19.238 0 21.49 0 24.27"})),C||(C=eA.createElement("path",{fill:"#00C8F8",d:"m18.678 24.317-7.904 10.386c-.168.218 0 .516.285.516h5.836c.242 0 .411.228.327.446l-2.807 7.014c-.148.357.37.615.612.307l7.967-10.426c.17-.218 0-.525-.285-.515l-5.34.06c-.232 0-.4-.21-.337-.427l2.269-7.073c.116-.358-.39-.586-.612-.288z"})))},e5=e=>{let{service:t,isSelected:a,surplus:l,onSelectionChange:n}=e,{formatMessage:r}=(0,eM.A)(),[i,s]=(0,eA.useState)(!1),{slug:o,image:c,isFree:d}={withBattery:{image:(0,ew.jsx)(e0,{title:r({id:"solarSimulator.additionalServices.battery.image"})}),isFree:!1,slug:"battery"},withCarCharger:{image:(0,ew.jsx)(e2,{title:r({id:"solarSimulator.additionalServices.carCharger.image"})}),isFree:!1,slug:"carCharger"},withSolarWallet:{image:(0,ew.jsx)(eK,{title:r({id:"solarSimulator.additionalServices.solarWallet.image"})}),isFree:!0,slug:"solarWallet"}}[t],u=r({id:"solarSimulator.additionalServices.".concat(o)}),m=r({id:"solarSimulator.additionalServices.".concat(o,".info")},{surplus:l});return(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",alignItems:"flex-end",gap:"xxs",children:[(0,ew.jsxs)(ey.m,{width:{base:100,md:112},height:{base:146},position:"relative",children:[a&&(0,ew.jsx)("div",{className:(0,eq.AH)({position:"absolute",right:"-0.6rem",top:"-0.6rem",zIndex:1}),children:(0,ew.jsx)(e$,{})}),(0,ew.jsx)(eR.AC,{padding:{base:"xsmall",md:"small"},fullHeight:!0,children:(0,ew.jsxs)(eS.$n,{onClick:()=>n(!a),variant:"text",fullHeight:!0,fullWidth:!0,children:[d&&(0,ew.jsx)("div",{className:(0,eq.AH)({position:"absolute",top:"-1.4rem",left:"-1.6rem"}),children:(0,ew.jsx)(eU.v,{color:"success500",size:"small",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.additionalServices.free.label"})})}),(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",alignItems:"center",justifyContent:"center",fullHeight:!0,children:[c,(0,ew.jsx)(eV.o5,{textStyle:"caption",textAlign:"center",children:u})]})]})}),i&&(0,ew.jsx)("div",{className:(0,eq.AH)({background:"rgb(24 0 72 / 0.9)",borderRadius:"1.2rem",inset:0,margin:"0.2rem",padding:"0.4rem",position:"absolute"}),children:(0,ew.jsx)(eJ.BJ,{alignItems:"center",justifyContent:"center",fullHeight:!0,children:(0,ew.jsx)(eV.o5,{textStyle:"caption",textAlign:"center",children:m})})})]}),(0,ew.jsx)(eS.$n,{onClick:()=>s(e=>!e),variant:"text",children:i?(0,ew.jsx)(eY._HK,{size:18,title:r({id:"icon.info.fill"})}):(0,ew.jsx)(eY.UxG,{size:18,title:r({id:"icon.info"})})})]})};var e3=a(46327);let e4=e=>{let{services:t,surplus:a,onServiceChange:l}=e;return(0,ew.jsx)(ey.m,{maxWidth:"35rem",margin:"auto",children:(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",gap:"md",children:[(0,ew.jsx)(eV.o5,{component:"p",textAlign:{base:"center",md:"start"},textStyle:"heading3",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.additionalServices.title"})}),(0,ew.jsxs)(eJ.BJ,{justifyContent:"space-between",children:[(0,ew.jsx)(e3.a,{flexGrow:0,flexShrink:0,children:(0,ew.jsx)(e5,{isSelected:t.withSolarWallet,onSelectionChange:e=>l("withSolarWallet",e),service:"withSolarWallet",surplus:a})}),(0,ew.jsx)(e3.a,{flexGrow:0,flexShrink:0,children:(0,ew.jsx)(e5,{isSelected:t.withBattery,onSelectionChange:e=>l("withBattery",e),service:"withBattery",surplus:a})}),(0,ew.jsx)(e3.a,{flexGrow:0,flexShrink:0,children:(0,ew.jsx)(e5,{isSelected:t.withCarCharger,onSelectionChange:e=>l("withCarCharger",e),service:"withCarCharger",surplus:a})})]})]})})};var e6=a(99021);let e7=e=>{let{variant:t=(0,eZ.S)("colors.background.base.100"),width:a=16,height:l=17}=e,{formatMessage:n}=(0,eM.A)();return(0,ew.jsxs)("svg",{width:a,height:l,viewBox:"0 0 ".concat(a," ").concat(l),fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ew.jsx)("title",{id:"title-info-icon",children:"".concat(n({id:"icon.alert.info",defaultMessage:"Icono de informaci\xf3n"}))}),(0,ew.jsx)("path",{d:"M8 0.02C3.58 0.02 0 3.73 0 8.3C0 12.87 3.58 16.58 8 16.58C12.42 16.58 16 12.87 16 8.3C16 3.73 12.42 0.02 8 0.02ZM8 15.55C4.14 15.55 1 12.3 1 8.3C1 4.31 4.14 1.06 8 1.06C11.86 1.06 15 4.31 15 8.3C15 12.3 11.86 15.55 8 15.55ZM8 5.97C8.41 5.97 8.75 5.63 8.75 5.2C8.75 4.77 8.41 4.42 8 4.42C7.59 4.42 7.25 4.77 7.25 5.2C7.25 5.63 7.58 5.97 8 5.97ZM9.5 11.41H8.5V7.78C8.5 7.5 8.28 7.27 8 7.27H7C6.72 7.27 6.5 7.5 6.5 7.78C6.5 8.07 6.72 8.3 7 8.3H7.5V11.41H6.5C6.22 11.41 6 11.64 6 11.92C6 12.21 6.22 12.44 6.5 12.44H9.5C9.78 12.44 10 12.21 10 11.92C10 11.64 9.78 11.41 9.5 11.41Z",fill:t})]})},e8=[3,6,12,36,60,72,84,96,108,120,144,180,216,240];var e9=a(57257),te=a(53156),tt=a(50430),ta=a(94655),tl=a(40313);let tn=e=>{let{onChangeSlider:t,sliderValue:a}=e;return(0,ew.jsx)(ey.m,{fullWidth:!0,marginTop:"xl",marginX:"auto",paddingLeft:"md",paddingTop:"lg",children:(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",fullWidth:!0,gap:"none",children:[(0,ew.jsx)(ta.A,{"data-testid":"slider",defaultValue:a,disabled:!1,max:Math.max(...e8),min:Math.min(...e8),onChange:t,value:a,valueLabelDisplay:"on",valueLabelFormat:e=>(0,tl.f)((0,te.N)(e,e8))}),(0,ew.jsx)(e3.a,{children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"caption",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.years",values:{maxFinancingYears:Math.max(...e8)/12}})})})]})})};var tr=a(24200),ti=a(14517);let ts=e=>{let{isFinanced:t,toggleFinancing:a}=e;return(0,ew.jsxs)(eJ.BJ,{alignItems:"center",gap:"xs",justifyContent:"center",children:[(0,ew.jsx)(eV.o5,{component:"p",textStyle:"title2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.onePayment"})}),(0,ew.jsx)(tr.dO,{checked:t,onChange:e=>{let{target:t}=e;return a(t.checked)},children:(0,ew.jsx)(ti.d,{})}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"title2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.financed"})})]})};var to=a(70687);let tc=e=>{let{quote:t,services:a,isFinanced:l,financedMonths:n,financedMonthlyPayment:r,onFinancingChange:i,onFinancedMonthsChange:s,isPending:o=!1}=e,c=(0,eA.useMemo)(()=>{var e;let l=null!=(e=null==t?void 0:t.totalPanelPrice)?e:0;return a.withBattery&&(l+=(null==t?void 0:t.batteryPrice)||0),a.withCarCharger&&(l+=(null==t?void 0:t.chargerPrice)||0),l},[t,a]);return t?(0,ew.jsx)(e6.xA,{fullHeight:!0,fullWidth:!0,gridTemplateColumns:{base:"repeat(1, 30rem)",md:"repeat(1, 38rem)"}
1,justifyContent:{base:"center",lg:"flex-start",md:"center"},children:(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"sm",children:[(0,ew.jsxs)(eR.AC,{fullWidth:!0,padding:"small",theme:"base500",children:[(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"sm",children:[(0,ew.jsx)(ts,{isFinanced:l,toggleFinancing:i}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"title1",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.title"})})]}),(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"none",children:[(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"p",textStyle:"display2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.numberOfPanels",values:{numberOfPanels:t.numberOfPanels}})}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"heading3",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.panelPower",values:{panelPower:"".concat(t.panelPower).concat(t.panelPowerUnit),totalPower:"".concat(t.totalPower).concat(t.totalPowerUnit)}})})]}),l&&(0,ew.jsx)(tn,{onChangeSlider:e=>{o||s((0,te.N)(e,e8))},sliderValue:n}),a.withBattery&&(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"none",children:[(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"p",textStyle:"display2",children:"+"}),(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"p",textStyle:"display2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.battery"})}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"heading3",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.batteryPower",values:{batteryPower:tt.G}})})]}),a.withCarCharger&&(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"none",children:[(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"p",textStyle:"display2",children:"+"}),(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"p",textStyle:"display2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.charger"})})]}),(0,ew.jsx)("span",{className:(0,eq.AH)({border:"0.1rem solid ".concat((0,eZ.S)("colors.background.tertiary.500")),margin:"1.5rem auto 1rem",width:"100%"})}),(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",fullWidth:!0,gap:"none",children:[!l&&(0,ew.jsx)(ey.m,{marginY:"xs",children:(0,ew.jsx)(eJ.BJ,{alignItems:"center",justifyContent:"center",children:(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"span",overflow:"hidden",textOverflow:"ellipsis",textStyle:"display2",whiteSpace:"nowrap",children:"".concat((0,e9.ZV)(c,{locale:"de-DE"}),"â¬")})})}),l&&r&&(0,ew.jsx)(ey.m,{marginY:"xs",children:(0,ew.jsx)(eJ.BJ,{alignItems:"center",justifyContent:"center",children:(0,ew.jsx)(eV.o5,{color:"tertiary500",component:"span",overflow:"hidden",textOverflow:"ellipsis",textStyle:"display2",whiteSpace:"nowrap",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.monthlyPayment",values:{monthlyPayment:"".concat((0,e9.ZV)(r,{locale:"de-DE"}),"â¬")}})})})}),(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",gap:"none",children:[(0,ew.jsx)(eV.o5,{textAlign:"center",textStyle:"caption",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.iva"})}),(0,ew.jsx)(eV.o5,{textAlign:"center",textStyle:"caption",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.savedText",values:{twentyFiveYearSavings:(0,to.K)(a.withBattery,a.withSolarWallet,t.twentyFiveYearSavingsMultipliers,t.numberOfPanels)}})})]})]})]}),(0,ew.jsx)(ey.m,{fullWidth:!0,children:(0,ew.jsxs)(eJ.BJ,{alignItems:"flex-start",flexDirection:"row",fullWidth:!0,gap:"xs",children:[(0,ew.jsx)(e3.a,{flex:"0 0 auto",children:(0,ew.jsx)(ey.m,{marginTop:"xxs",children:(0,ew.jsx)(e7,{})})}),(0,ew.jsx)(e3.a,{flex:"1 1 auto",children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"caption",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.informativeText"})})})]})})]})}):null};var td=a(203),tu=a(15753);let tm=(0,a(64627).Fj)({variants:{variant:{purpleHaze:{fill:"background.base.300"},sohoLights:{fill:"background.primary.500"}}}}),th=e=>{let{variant:t="purpleHaze",width:a=60,height:l=75}=e,{formatMessage:n}=(0,eM.A)();
1return(0,ew.jsxs)("svg",{className:(0,eq.AH)({height:"auto"}),height:l,viewBox:"0 0 ".concat(a," ").concat(l),width:a,xmlns:"http://www.w3.org/2000/svg",children:[(0,ew.jsx)("title",{id:"title-rectangle-bar",children:n({defaultMessage:"Icono de un rect\xe1ngulo",id:"icon.rectangle"})}),(0,ew.jsx)("rect",{className:tm({variant:t}),height:l,rx:"7",width:a})]})};function tp(){return(tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tg=function(e){return eA.createElement("svg",tp({xmlns:"http://www.w3.org/2000/svg",width:240,height:83,fill:"none"},e),E||(E=eA.createElement("path",{fill:"#939393",d:"M9.9 22.724v46.505a2.625 2.625 0 0 0 2.626 2.626h43.622a2.627 2.627 0 0 0 2.626-2.626V12.321a2.626 2.626 0 0 0-2.626-2.626l-33.05-.117-.44 13.976z"})),A||(A=eA.createElement("path",{fill:"#EAEAEA",d:"M5.81 19.079v46.505a2.626 2.626 0 0 0 2.627 2.626H52.06a2.627 2.627 0 0 0 2.627-2.626V8.67a2.626 2.626 0 0 0-2.617-2.626l-33.05-.115-.434 13.974z"})),M||(M=eA.createElement("path",{fill:"#B5B5B5",d:"M6.397 17.419 17.43 6.543a2.123 2.123 0 0 1 3.615 1.513V18.56a2.125 2.125 0 0 1-2.055 2.123l-11.035.37a2.123 2.123 0 0 1-1.56-3.634"})),F||(F=eA.createElement("path",{fill:"#100030",d:"M48.947 28.982H11.55a1.111 1.111 0 1 1 0-2.222h37.397a1.111 1.111 0 1 1 0 2.222M48.947 35.784H11.55a1.111 1.111 0 0 1 0-2.222h37.397a1.111 1.111 0 0 1 0 2.221M37.21 42.584h-26c-.426 0-.772-.497-.772-1.11 0-.615.346-1.112.772-1.112h26c.426 0 .771.5.771 1.111 0 .612-.345 1.111-.772 1.111M37.21 49.636h-26c-.426 0-.772-.499-.772-1.111s.346-1.11.772-1.11h26c.426 0 .771.496.771 1.11s-.345 1.111-.772 1.111M22.871 56.686H10.796c-.202 0-.357-.497-.357-1.111s.16-1.111.357-1.111h12.075c.202 0 .36.497.36 1.11 0 .615-.162 1.112-.36 1.112"})),k||(k=eA.createElement("path",{fill:"#0072DB",d:"m45.507 9.684-4.626 6.467h3.41l-1.899 5.05 4.814-6.702-3.161.04zM47.206 14.499h.202a.102.102 0 0 1 .103.11.1.1 0 0 1-.02.052l-5.469 7.506a.04.04 0 0 1-.02.016.035.035 0 0 1-.043-.024.04.04 0 0 1 .003-.027l.432-.93z"})),P||(P=eA.createElement("path",{fill:"#0072DB",d:"M44.043 14.544h.267l1.513-5.16a.05.05 0 0 0-.028-.056.05.05 0 0 0-.061.014l-.228.346z"})),_||(_=eA.createElement("path",{fill:"#D39E40",d:"M55.615 78.713c8.789 0 15.914-7.124 15.914-15.911 0-8.788-7.125-15.911-15.914-15.911S39.701 54.014 39.701 62.8c0 8.788 7.125 15.912 15.914 15.912"})),B||(B=eA.createElement("path",{fill:"#FFDEA4",d:"M57.993 78.713c8.789 0 15.914-7.124 15.914-15.911 0-8.788-7.125-15.911-15.914-15.911S42.079 54.014 42.079 62.8c0 8.788 7.125 15.912 15.914 15.912"})),I||(I=eA.createElement("path",{fill:"#F8C050",d:"M69.499 51.812a77 77 0 0 1-3.66 8.706c-3.59 7.271-7.967 13.374-12.286 17.56a15.91 15.91 0 0 0 18.049-7.018 15.905 15.905 0 0 0-2.103-19.248"})),D||(D=eA.createElement("path",{fill:"#D39E40",d:"M63.606 57.195c-1.219-1.702-2.806-2.944-5.658-2.944-3.404 0-5.75 2.139-6.693 5.175h-2.162v2.323h1.725c-.023.276-.023.575-.023.851 0 .253 0 .483.023.713h-1.725v2.323h2.116c.897 3.151 3.29 5.267 6.808 5.267 2.645 0 4.278-1.265 5.635-3.174l-2.53-1.863c-1.012 1.242-1.77 1.886-3.105 1.886-1.449 0-2.507-.759-3.105-2.116h4.278v-2.323h-4.784c-.023-.23-.023-.506-.023-.759 0-.276 0-.552.023-.805h4.784v-2.323h-4.232c.575-1.265 1.564-2.024 2.921-2.024 1.334 0 2.185.644 3.06 1.817z"})),z||(z=eA.createElement("path",{fill:"#D39E40",d:"M57.993 76.594a13.795 13.795 0 0 1-13.53-16.483A13.792 13.792 0 0 1 63.272 50.06a13.79 13.79 0 0 1 8.515 12.742 13.807 13.807 0 0 1-13.794 13.792m0-27.067a13.28 13.28 0 0 0-12.269 8.196 13.275 13.275 0 0 0 9.678 18.103 13.282 13.282 0 0 0 15.87-13.022 13.29 13.29 0 0 0-13.28-13.28z"})),O||(O=eA.createElement("path",{fill:"#939393",d:"M172.704 23.194V69.26a2.596 2.596 0 0 0 2.597 2.597h43.207a2.595 2.595 0 0 0 2.597-2.597V12.88a2.594 2.594 0 0 0-2.591-2.596l-32.731-.117-.437 13.844-12.648-.817z"})),W||(W=eA.createElement("path",{fill:"#EAEAEA",d:"M168.659 19.582v46.066a2.596 2.596 0 0 0 2.597 2.597h43.207a2.595 2.595 0 0 0 2.597-2.597V9.274a2.594 2.594 0 0 0-2.591-2.597l-32.731-.116-.437 13.843-12.648-.817z"})),N||(N=eA.createElement("path",{fill:"#B5B5B5",d:"m169.237 17.936 10.931-10.768c1.331-1.308 3.578-.368 3.578 1.5v10.4a2.1 2.1 0 0 1-2.031 2.101l-10.931.368c-1.915.064-2.913-2.253-1.547-3.601"})),T||(T=eA.createElement("path",{fill:"#100030",d:"M211.382 29.392h-37.038c-.607 0-1.103-.49-1.103-1.103s.49-1.104 1.103-1.104h37.038c.607 0 1.103.49 1.103 1.104 0 .612-.49 1.103-1.103 1.103M211.382 36.133h-37.038c-.607 0-1.103-.49-1.103-1.103s.49-1.103 1.103-1.103h37.038c.607 0 1.103.49 1.103 1.103s-.49 1.103-1.103 1.103M199.756 42.868h-25.75c-.42 0-.765-.49-.765-1.103s.345-1.103.765-1.103h25.75c.42 0 .764.49.764 1.103s-.344 1.103-.764 1.103M199.756 49.849h-25.75c-.42 0-.765-.49-.765-1.103s.345-1.103.765-1.103h25.75c.42 0 .764.49.764 1.103 0 .612-.344 1.103-.764 1.103M185.556 56.835h-11.959c-.198 0-.356-.49-.356-1.103s.158-1.103.356-1.103h11.959c.198 0 .356.49.356 1.103s-.158 1.103-.356 1.103"})),H||(H=eA.createElement("path",{fill:"#D39E40",d:"M217.983 78.651c8.703 0 15.758-7.055 15.758-15.758s-7.055-15.758-15.758-15.758-15.758 7.055-15.758 15.758 7.055 15.758 15.758 15.758"})),L||(L=eA.createElement("path",{fill:"#FFDEA4",d:"M220.34 78.651c8.703 0 15.758-7.055 15.758-15.758s-7.055-15.758-15.758-15.758-15.758 7.055-15.758 15.758 7.055 15.758 15.758 15.758"})),q||(q=eA.createElement("path",{fill:"#F8C050",d:"M231.728 52.008a
176 76 0 0 1-3.625 8.626c-3.554 7.202-7.89 13.248-12.168 17.398 1.394.409 2.871.63 4.4.63 8.702 0 15.758-7.056 15.758-15.758 0-4.225-1.663-8.06-4.371-10.885z"})),J||(J=eA.createElement("path",{fill:"#D39E40",d:"M220.341 76.556c-7.535 0-13.663-6.128-13.663-13.663 0-7.534 6.128-13.663 13.663-13.663 7.534 0 13.663 6.129 13.663 13.663s-6.129 13.663-13.663 13.663m0-26.812c-7.249 0-13.15 5.9-13.15 13.15 0 7.248 5.901 13.149 13.15 13.149 7.248 0 13.149-5.9 13.149-13.15 0-7.248-5.901-13.149-13.149-13.149"})),R||(R=eA.createElement("path",{fill:"#FF48D8",d:"M209.146 18.939c.012.373.234.91.607 1.12.339.187.607.275.607.485s-1.009.735-2.048.222c-1.039-.514-1.133-1.15-1.203-1.413 1.133-.677 2.031-.414 2.031-.414z"})),U||(U=eA.createElement("path",{fill:"#FF48D8",d:"M210.377 18.285c.146-.683 1.162-1.663 1.284-3.005.164-1.763-.723-4.891-5.077-4.891s-4.996 3.233-4.996 4.581c0 1.804 1.325 2.737 1.266 3.38 1.08.852 5.166 1.844 7.529-.065z"})),V||(V=eA.createElement("path",{fill:"#FF48D8",d:"M204.016 18.939c-.012.373-.234.91-.607 1.12-.339.187-.607.275-.607.485s1.009.735 2.048.222c1.039-.514 1.133-1.15 1.203-1.413-1.133-.677-2.031-.414-2.031-.414z"})),Y||(Y=eA.createElement("path",{fill:"#FF48D8",d:"M207.757 19.195s-.081.73-.21 1.162c-.128.432-.274 1.15-1.021 1.15s-.916-.823-.969-1.121c-.052-.321-.14-1.272-.14-1.272s1.15-1.033 2.335.081zM210.349 18.28c-.099.776.688.8.648 1.243-.041.444-1.687.444-2.131-.426s1.477-.817 1.477-.817zM202.86 18.28c.1.776-.688.8-.648 1.243.041.444 1.687.444 2.131-.426s-1.477-.817-1.477-.817z"})),Z||(Z=eA.createElement("path",{fill:"#fff",d:"M204.646 17.264a1.185 1.185 0 1 0 0-2.37 1.185 1.185 0 0 0 0 2.37"})),$||($=eA.createElement("path",{fill:"url(#invoice-comparison_svg__a)",d:"M204.727 17.1a.835.835 0 1 0 0-1.669.835.835 0 0 0 0 1.67"})),G||(G=eA.createElement("path",{fill:"#fff",d:"M204.243 16.01a.186.186 0 1 0 .001-.374.186.186 0 0 0-.001.373M208.358 17.17a1.09 1.09 0 1 0 0-2.182 1.09 1.09 0 0 0 0 2.182"})),K||(K=eA.createElement("path",{fill:"url(#invoice-comparison_svg__b)",d:"M208.358 17.088a.829.829 0 1 0 0-1.657.829.829 0 0 0 0 1.657"})),X||(X=eA.createElement("path",{fill:"#fff",d:"M207.926 15.974a.193.193 0 0 0 .193-.193.193.193 0 0 0-.386 0c0 .107.087.193.193.193"})),Q||(Q=eA.createElement("path",{fill:"#100030",d:"M209.537 13.89s.053.024.082.035c.023.012.052.03.076.041a.474.474 0 0 1 .157.122.08.08 0 0 1-.017.117c-.024.018-.059.024-.082.012l-.035-.012s-.023-.011-.047-.017q-.027-.009-.064-.018l-.07-.017c-.023 0-.047-.012-.07-.012-.07-.011-.123-.076-.111-.146s.076-.122.146-.11c.012 0 .023 0 .035.011zM203.654 14.27s-.047 0-.07.006a.3.3 0 0 0-.07.011c-.024 0-.047.012-.07.018a.3.3 0 0 0-.053.017l-.017.012c-.035.018-.07 0-.088-.03-.012-.023-.006-.046 0-.063.023-.035.047-.053.07-.076l.07-.053c.023-.017.047-.029.076-.046.023-.012.047-.03.076-.041h.006a.13.13 0 0 1 .175.058.135.135 0 0 1-.064.175q-.026.01-.053.012zM206.082 17.936l.058.046q.037.018.082.035.096.028.21.03c.07 0 .152-.018.222-.047.035-.012.064-.03.093-.041l.03-.018.023-.011.134-.064c.041-.024.094 0 .117.04 0 .006.006.018.006.03a.4.4 0 0 1-.012.14.04.04 0 0 1-.012.029l-.011.029s-.024.035-.029.052a.5.5 0 0 1-.158.146.75.75 0 0 1-.379.123.66.66 0 0 1-.397-.105.6.6 0 0 1-.164-.164.35.35 0 0 1-.046-.245c.011-.064.076-.099.134-.087.023 0 .047.017.064.035l.047.052z"})),ee||(ee=eA.createElement("path",{fill:"#D39E40",d:"M226.272 57.195c-1.219-1.702-2.806-2.944-5.658-2.944-3.404 0-5.75 2.139-6.693 5.175h-2.162v2.323h1.725c-.023.276-.023.575-.023.851 0 .253 0 .483.023.713h-1.725v2.323h2.116c.897 3.151 3.289 5.267 6.808 5.267 2.645 0 4.278-1.265 5.635-3.174l-2.53-1.863c-1.012 1.242-1.771 1.886-3.105 1.886-1.449 0-2.507-.759-3.105-2.116h4.278v-2.323h-4.784c-.023-.23-.023-.506-.023-.759 0-.276 0-.552.023-.805h4.784v-2.323h-4.232c.575-1.265 1.564-2.024 2.921-2.024 1.334 0 2.185.644 3.059 1.817z"})),et||(et=eA.createElement("path",{fill:"url(#invoice-comparison_svg__c)",d:"M96 39.44a2 2 0 1 0 0 4zm46.938 3.414a2 2 0 0 0 0-2.829L130.21 27.297a2 2 0 0 0-2.829 2.829l11.314 11.314-11.314 11.313a2 2 0 1 0 2.829 2.829zM96 43.44h45.524v-4H96z"})),ea||(ea=eA.createElement("defs",null,eA.createElement("linearGradient",{id:"invoice-comparison_svg__a",x1:205.515,x2:203.869,y1:16.266,y2:16.266,gradientUnits:"userSpaceOnUse"},eA.createElement("stop",null),eA.createElement("stop",{offset:.45,stopColor:"#100030"}),eA.createElement("stop",{offset:.84,stopColor:"#180070"}),eA.createElement("stop",{offset:1})),eA.createElement("linearGradient",{id:"invoice-comparison_svg__b",x1:207.529,x2:209.14,y1:16.259,y2:16.259,gradientUnits:"userSpaceOnUse"},eA.createElement("stop",null),eA.createElement("stop",{offset:.45,stopColor:"#100030"}),eA.createElement("stop",{offset:.84,stopColor:"#180070"}),eA.createElement("stop",{offset:1})),eA.createElement("linearGradient",{id:"invoice-comparison_svg__c",x1:93.832,x2:134.659,y1:41.44,y2:41.44,gradientUnits:"userSpaceOnUse"},eA.createElement("stop",{stopColor:"#D9DDFF"}),eA.createElement("stop",{offset:1,stopColor:"#F050F8"})))))};function tf(){return(tf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tx=function(e){return eA.createElement("svg",tf({xmlns:"http://www.w3.org/2000/svg",width:9,height:9,fill:"none"},e),el||(el=eA.createElement("circle",{cx:4.5,cy:4.5,r:4.5,fill:"#F050F8"})))};function tv(){return(tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tb=function(e){return eA.createElement("svg",tv({xmlns:"http://www.w3.org/2000/svg",width:9,height:9,fill:"none"},e),en||(en=eA.createElement("circle",{cx:4.5,cy:4.5,r:4.5,fill:"#D9DDFF"})))},tj=(0,eq.AH)({backgroundColor:"{colors.background.secondary.500}",border:"none",height:"0.1rem",margin:0,width:"100%"}),tw=()=>(0,ew.jsx)("hr",{className:tj}),ty=e=>{let{consumption:t,services:a,quote:l}=e,{formatMessage:n}=(0,eM.A)(),r=(0,eA.useMemo)(()=>
1{if(!l||!t)return null;let{withBattery:e,withSolarWallet:n}=a,{withBatteryAndSolarWallet:r,withSolarWallet:i,withBattery:s,basicInstallation:o}=l.postInstallationMultipliers,c=o;return e&&n?c=r:n?c=i:e&&(c=s),Math.round(t*(null!=c?c:1))},[t,a,l]),i=(0,eA.useMemo)(()=>void 0===t||null===r?{futureBill:0,previousBill:0}:{futureBill:r,previousBill:t},[t,r]);return t?(0,ew.jsx)(ey.m,{fullHeight:!0,marginBottom:"xl",marginX:"auto",children:(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",gap:"lg",children:[(0,ew.jsx)(eV.o5,{component:"p",textStyle:"heading3",children:n({id:"solarSimulator.InvoiceComparison.paragraph.one"})}),(0,ew.jsxs)(eJ.BJ,{fullWidth:!0,justifyContent:"center",children:[(0,ew.jsx)(td.b,{hidden:{base:!0,md:!1},children:(0,ew.jsx)(tg,{title:n({id:"solarSimulator.InvoiceComparison.image.one"})})}),(0,ew.jsx)(td.b,{hidden:{base:!1,md:!0},children:(0,ew.jsx)(tg,{title:n({id:"solarSimulator.InvoiceComparison.image.one"})})})]}),(0,ew.jsx)(ey.m,{fullHeight:!0,marginX:"auto",maxWidth:{base:360,lg:450},position:"relative",children:(0,ew.jsx)(ey.m,{fullHeight:!0,fullWidth:!0,position:"relative",zIndex:2,children:(0,ew.jsxs)(e6.xA,{fullHeight:!0,fullWidth:!0,gridTemplateColumns:{base:"repeat(14, 1fr)"},gridTemplateRows:{base:"auto auto auto auto 0px auto",lg:"auto auto auto auto 0px auto"},rowGap:{base:"md",lg:"lg"},children:[[void 0,void 0,void 0,void 0].map((e,t)=>(0,ew.jsx)(tu.A,{alignSelf:"end",gridColumnEnd:15,gridColumnStart:1,gridRowEnd:t+2,gridRowStart:t+1,children:(0,ew.jsx)(tw,{})},t)),(0,ew.jsx)(tu.A,{alignSelf:"end",gridColumnEnd:7,gridColumnStart:5,gridRowEnd:5,gridRowStart:1,children:(0,ew.jsx)(eJ.BJ,{fullHeight:!0,gap:"sm",justifyContent:"flex-end",children:(0,ew.jsx)(th,{height:i.previousBill,variant:"purpleHaze",width:60})})}),(0,ew.jsx)(tu.A,{alignSelf:"end",gridColumnEnd:11,gridColumnStart:9,gridRowEnd:5,gridRowStart:1,children:(0,ew.jsx)(eJ.BJ,{alignItems:"flex-end",fullHeight:!0,justifyContent:"flex-end",children:(0,ew.jsx)(th,{height:i.futureBill,variant:"sohoLights",width:60})})}),(0,ew.jsx)(tu.A,{gridColumnEnd:7,gridColumnStart:5,gridRowStart:5,children:(0,ew.jsx)(eJ.BJ,{alignItems:"center",fullHeight:!0,justifyContent:"center",children:(0,ew.jsx)(eV.o5,{component:"p",textStyle:"caption",children:"".concat(t,"â¬")})})}),(0,ew.jsx)(tu.A,{gridColumnEnd:11,gridColumnStart:9,gridRowStart:5,children:(0,ew.jsx)(eJ.BJ,{alignItems:"center",fullHeight:!0,justifyContent:"center",children:(0,ew.jsxs)(eV.o5,{component:"p",textStyle:"caption",children:[r,"â¬"]})})}),(0,ew.jsx)(tu.A,{gridColumnEnd:8,gridColumnStart:1,gridRowStart:6,children:(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"row",fullWidth:!0,gap:"xl",justifyContent:"flex-start",children:[(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"row",gap:"xs",children:[(0,ew.jsx)(tb,{title:n({id:"solarSimulator.InvoiceComparison.image.four"})}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"caption",children:n({id:"solarSimulator.InvoiceComparison.legend.one"}).replace(/\s/g,"\xa0")})]}),(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"row",gap:"xs",children:[(0,ew.jsx)(tx,{title:n({id:"solarSimulator.InvoiceComparison.image.five"})}),(0,ew.jsx)(eV.o5,{component:"p",textStyle:"caption",children:n({id:"solarSimulator.InvoiceComparison.legend.two"}).replace(/\s/g,"\xa0")})]})]})})]})})})]})}):null};var tS=a(25302),tC=a(46771),tE=a.n(tC),tA=a(95854),tM=a.n(tA),tF=a(97916);function tk(){return(tk=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tP=function(e){return eA.createElement("svg",tk({xmlns:"http://www.w3.org/2000/svg",width:20,height:18,fill:"none"},e),er||(er=eA.createElement("path",{fill:"azure",d:"M1.428 10 5 2.143l10-.714 2.857 6.428v4.286H1.428z"})),ei||(ei=eA.createElement("path",{fill:"#18F0B8",d:"m5.281 3.268-1.02 2.854h11.477l-1.02-2.854a1.25 1.25 0 0 0-1.179-.819H6.461a1.25 1.25 0 0 0-1.18.819M1.547 6.306 2.922 2.46C3.449.987 4.867 0 6.46 0h7.078c1.594 0 3.012.987 3.54 2.46l1.374 3.846A2.45 2.45 0 0 1 20 8.571v7.347c0 .678-.559 1.225-1.25 1.225H17.5c-.691 0-1.25-.547-1.25-1.225v-1.836H3.75v1.836c0 .678-.559 1.225-1.25 1.225H1.25c-.691 0-1.25-.547-1.25-1.225V8.572C0 7.55.64 6.672 1.547 6.305M5 9.796c0-.677-.559-1.225-1.25-1.225S2.5 9.12 2.5 9.796s.559 1.224 1.25 1.224S5 10.473 5 9.796m11.25 1.224c.691 0 1.25-.547 1.25-1.224s-.559-1.225-1.25-1.225S15 9.12 15 9.796s.559 1.224 1.25 1.224"})))};function t_(){return(t_=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tB=function(e){return eA.createElement("svg",t_({xmlns:"http://www.w3.org/2000/svg",width:22,height:22,f
1ill:"none"},e),es||(es=eA.createElement("g",{clipPath:"url(#plane_svg__a)"},eA.createElement("path",{fill:"#18F0B8",d:"M8.25 4.025C8.25 2.558 9.496 0 11 0s2.75 2.558 2.75 4.025v13.162l2.475 1.857a.64.64 0 0 1 .275.55v1.766c0 .37-.27.64-.64.64a1 1 0 0 1-.13-.021L11 20.625l-4.73 1.354a.8.8 0 0 1-.168.021c-.331 0-.602-.27-.602-.64v-1.766a.64.64 0 0 1 .275-.55l2.475-1.857z"}),eA.createElement("path",{fill:"#A4FFE8",d:"M8.25 13.75.905 16.16A.653.653 0 0 1 0 15.546V13.11c0-.46.23-.89.612-1.143L8.25 6.875zm5.5-6.875 7.64 5.092c.382.253.61.683.61 1.143v2.436c0 .469-.46.8-.907.614l-7.343-2.449z"}))),eo||(eo=eA.createElement("defs",null,eA.createElement("clipPath",{id:"plane_svg__a"},eA.createElement("path",{fill:"#fff",d:"M0 0h22v22H0z"})))))};function tI(){return(tI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let tD=function(e){return eA.createElement("svg",tI({xmlns:"http://www.w3.org/2000/svg",width:20,height:23,fill:"none"},e),ec||(ec=eA.createElement("g",{clipPath:"url(#tree_svg__a)"},eA.createElement("path",{fill:"#A4FFE8",d:"M7.5 10.795h1.071v-.718c0-.793.64-1.436 1.429-1.436s1.428.643 1.428 1.436v3.59H12.5c.266 0 .438.28.32.52l-1.39 2.351v5.025c0 .795-.634 1.437-1.424 1.437s-1.433-.644-1.433-1.437v-7.899l-1.389-2.353a.356.356 0 0 1 .317-.516"}),eA.createElement("path",{fill:"#18F0B8",d:"M18.518 20.126h-7.089v-3.589l1.39-2.352a.36.36 0 0 0-.32-.52h-1.07v-3.588c0-.793-.64-1.436-1.429-1.436s-1.428.643-1.428 1.436v.718H7.5a.36.36 0 0 0-.32.52l1.39 2.352v6.461H1.48c-1.272 0-1.95-1.55-1.102-2.532l3.08-3.574h-.678c-1.142 0-1.763-1.31-1.035-2.177l2.72-3.21h-.48c-.95 0-1.468-1.011-.86-1.676L9.14.38a1.167 1.167 0 0 1 1.723 0l6.022 6.579c.608.664.05 1.675-.86 1.675h-.481l2.717 3.21c.728.867.107 2.178-1.035 2.178h-.679l3.08 3.574c.84.977.167 2.53-1.11 2.53"}))),ed||(ed=eA.createElement("defs",null,eA.createElement("clipPath",{id:"tree_svg__a"},eA.createElement("path",{fill:"#fff",d:"M0 0h20v23H0z"})))))},tz={CarKms:2e4,FlightsAvoided:14,TreesPlanted:124},tO=e=>(0,ew.jsx)(eV.o5,{color:"success500",component:"span",textStyle:"title1",children:e}),tW=e=>{var t,a,l;let{quote:n}=e,{formatMessage:r}=(0,eM.A)(),i=[{icon:(0,ew.jsx)(tP,{width:34,title:r({id:"solarSimulator.SolarPanelsBenefits.icon.car"})}),text:"solarSimulator.SolarPanelsBenefits.paragraph.one"},{icon:(0,ew.jsx)(tD,{width:34,title:r({id:"solarSimulator.SolarPanelsBenefits.icon.tree"})}),text:"solarSimulator.SolarPanelsBenefits.paragraph.two"},{icon:(0,ew.jsx)(tB,{width:34,title:r({id:"solarSimulator.SolarPanelsBenefits.icon.plane"})}),text:"solarSimulator.SolarPanelsBenefits.paragraph.three"}],s={carKms:(0,e9.ZV)((null==n||null==(t=n.co2Emissions)?void 0:t.carKms)||tz.CarKms),flightsAvoided:(0,e9.ZV)((null==n||null==(a=n.co2Emissions)?void 0:a.flightsAvoided)||tz.FlightsAvoided),span:tO,treesPlanted:(0,e9.ZV)((null==n||null==(l=n.co2Emissions)?void 0:l.treesPlanted)||tz.TreesPlanted)};return(0,ew.jsx)(ey.m,{maxWidth:401,marginX:"auto",children:(0,ew.jsx)(eJ.BJ,{flexDirection:"column",gap:"sm",alignItems:"baseline",children:i.map(e=>(0,ew.jsxs)(eJ.BJ,{gap:"xs",children:[e.icon,(0,ew.jsx)(eV.o5,{component:"p",textStyle:"body2",children:(0,ew.jsx)(eX.A,{id:e.text,values:s})})]},e.text))})})},tN=e=>{let{state:t,contactForm:a,loadingQueryNewLead:l,financedMonthlyPayment:n,onFinancingChange:r,onFinancedMonthsChange:i,surplus:s,onServiceChange:o,onBack:c,isPending:d=!1}=e,{formatMessage:u}=(0,eM.A)();return(0,ew.jsxs)(ey.m,{position:"relative",children:[(0,ew.jsx)(ey.m,{marginTop:{lg:"lgXl"},children:(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:"column",justifyContent:"center",children:[t.params&&t.params.consumption<=e_.ZU&&!!t.quote&&(0,ew.jsx)(ey.m,{fullWidth:!0,marginX:{base:"md",lg:"auto",md:"md"},maxWidth:{lg:"105rem"},zIndex:1,children:(0,ew.jsxs)(eR.AC,{borderless:!0,padding:{base:"medium",md:"large"},theme:"base900",children:[(0,ew.jsx)(eV.o5,{color:"tertiary500",textStyle:"display2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.budgetEstimate.title"})}),(0,ew.jsx)("fieldset",{disabled:d,style:{border:0,margin:0,minWidth:0,padding:0},children:(0,ew.jsx)(ey.m,{fullWidth:!0,marginTop:"xl",maxWidth:{lg:"105rem"},children:(0,ew.jsxs)(e6.xA,{fullWidth:!0,gap:{base:"md",lg:"sm"},gridTemplateColumns:{base:"1fr",lg:"minmax(0, 1fr) minmax(0, 45rem)"},children:[(0,ew.jsx)(tu.A,{children:(0,ew.jsx)(ey.m,{fullWidth:!0,maxWidth:{lg:"42.5rem"},paddingLeft:{lg:"md"},children:(0,ew.jsxs)(eJ.BJ,{alignItems:{base:"center",lg:"flex-start"},flexDirection:"column",fullWidth:!0,gap:{base:"md",lg:"xxl"},children:[(0,ew.jsx)(td.b,{hidden:{base:!0,lg:!1},children:(0,ew.jsx)(ey.m,{fullWidth:!0,children:(0,ew.jsx)(e4,{onServiceChange:o,services:t.services,surplus:s})})}),(0,ew.jsx)(td.b,{hidden:{base:!1,lg:!0},children:(0,ew.jsx)(ey.m,{fullWidth:!0,children:(0,ew.jsx)(e4,{onServiceChange:o,services:t.services,surplus:s})})}),(0,ew.jsx)(tc,{financedMonthlyPayment:n,financedMonths:t.financedMonths,isFinanced:t.isFinanced,isPending:d,onFinancedMonthsChange:i,onFinancingChange:r,quote:t.quote,services:t.services}),(0,ew.jsx)(td.b,{hidden:{base:!0,lg:!1},children:(0,ew.jsx)(tW,{quote:t.quote})}),(0,ew.jsx)(td.b,{hidden:{base:!1,lg:!0},children:(0,ew.jsx)(ty,{consumption:t.params.consumption,quote:t.quote,services:t.services})})]})})}),(0,ew.jsx)(tu.A,{children:(0,ew.jsx)(ey.m,{fullWidth:!0,paddingLeft:{lg:"sm"},children:(0,ew.jsxs)(eJ.BJ,{alignItems:{lg:"flex-end"},flexDirection:"column",fullWidth:!0,gap:"md",justifyContent:{lg:"flex-start"},children:[(0,ew.jsx)(td.b,{hidden:{base:!0,lg:!1},children:(0,ew.jsx)(ey.m,{fullWidth:!0,maxWidth:{base:360,md:450},children:(0,ew.jsx)(ty,{consumption:t.params.consumption,quote:t.quote,services:t.services})})}),(0,ew.jsx)(td.b,{hidden:{base:!1,lg:!0},children:(0,ew.jsx)(tW,{quote:t.quote})}),a]})})})]})})})]})}),!l&&(0,ew.jsx)(ey.m,{marginBottom:"xxl",marginTop:"lgXl",zIndex:1,children:(0,ew.jsx)(eJ.BJ,{justifyContent:"center",children:(0,ew.jsx)(tM(),{"aria-disabled":d,href:tS.M.Home,onClick:e=>{(c||d)&&e.preventDefault(),!d&&c&&c().catch(()=>{})},children:(0,ew.jsx)(eV.o5,{textStyle:"body1",children:u({id:"solarSimulator.backButton"})})})})})]})}),(0,ew.jsx)(ey.m,{bottom:0,position:"absolute",zIndex:0,children:(0,ew.jsx)(tE(),{alt:"Banner",src:tF.A,style:{height:"auto"}})})]})};var tT=a(54566),tH=a(42397),tL=a(8484),tq=a(66504),tJ=a(74537),tR=a(63781);let tU={EarlyInstallation:"Instalaci\xf3n para lo antes posible",NextMonths:"Instalaci\xf3n hasta 6 meses",OnlyInfo:"Solo inform\xe1ndose"};var tV=a(84374),tY=a(60785),tZ=a(19191),t$=a(61887),tG=a(15014),tK=a(84501);let tX=e=>{let{initialValues:t,numberOfPanels:a,onValuesChange:l,onSubmit:n,onDirectSale:r,isPending:i=!1,children:s}=e,{formatMessage:o}=(0,eM.A)(),c=(null!=a?a:0)<=15&&!!r;return(0,ew.jsx)(ey.m,{marginRight:{base:"auto",lg:"xxl"},marginX:{base:"auto",lg:"none"},maxWidth:{base:360,lg:450},children:(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",gap:"lg",children:[(0,ew.jsx)(eV.o5,{component:"p",children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"heading3",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.title"})})}),(0,ew.jsx)(tR.l1,{enableReinitialize:!0,initialValues:t,onSubmit:async e=>{if(!i)try{await n(e)}catch(e){}}
1,validationSchema:(e=>tV.Ik().shape({email:tV.Yj().email(()=>e({id:"common.validation.validEmail"})).required(()=>e({id:"common.validation.requiredEmail"})),firstName:tV.Yj().trim().required(()=>e({id:"common.validation.requiredGivenName"})).test("firstName",()=>e({id:"common.validation.validGivenName"}),e=>(0,tY.F)(e)),installationPreference:tV.Yj().oneOf(Object.values(tU),()=>e({id:"solarSimulator.ContactSpecialistForm.installationPreference.required"})).required(()=>e({id:"solarSimulator.ContactSpecialistForm.installationPreference.required"})),isAdultAndDataProcessingAuthorized:tV.zM().nullable().required(()=>e({id:"solarSimulator.ContactSpecialistForm.checkbox.required"})).test("checked",()=>e({id:"solarSimulator.ContactSpecialistForm.checkbox.required"}),e=>!!e),lastName:tV.Yj().trim().required(()=>e({id:"common.validation.requiredSurnames"})).test("lastName",()=>e({id:"common.validation.validSurnames"}),e=>(0,tY.F)(e)),phone:tV.Yj().required(()=>e({id:"common.validation.requiredPhone"})).test("phone",()=>e({id:"common.validation.validPhone"}),e=>{let t=(0,tZ.G)(null!=e?e:"");return(0,t$.g0)(t)})}))(o),children:e=>{let{setTouched:t,handleBlur:a,handleChange:n,values:d,submitForm:u,validateForm:m,setSubmitting:h,isSubmitting:p,errors:g,touched:f}=e;return(0,ew.jsxs)(tR.lV,{children:[(0,ew.jsx)(tG.m,{onValuesChange:l}),s,(0,ew.jsx)("fieldset",{disabled:i||p,style:{border:0,margin:0,minWidth:0,padding:0},children:(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",children:[(0,ew.jsx)(tJ.G8,{id:"firstName",label:o({id:"common.field.name.label"}),name:"firstName",type:"text"}),(0,ew.jsx)(tJ.G8,{id:"lastName",label:o({id:"common.field.surnames.label"}),name:"lastName",type:"text"}),(0,ew.jsx)(tJ.G8,{id:"phone",label:o({id:"common.field.phone.label"}),name:"phone",type:"text"}),(0,ew.jsx)(tJ.G8,{id:"email",label:o({id:"common.field.email.label"}),name:"email",type:"text"}),(0,ew.jsx)(tT.n,{padding:"small",theme:"base500",title:o({id:"solarSimulator.ContactSpecialistForm.installationPreference.title"}),children:(0,ew.jsxs)(tH.s,{error:!!f.installationPreference&&!!g.installationPreference,name:"installationPreference",onBlur:a,onChange:n,value:d.installationPreference,children:[(0,ew.jsx)(tL.Z,{value:tU.EarlyInstallation,children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"body2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.installationPreference.earlyInstallation"})})}),(0,ew.jsx)(tL.Z,{value:tU.NextMonths,children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"body2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.installationPreference.nextMonths"})})}),(0,ew.jsx)(tL.Z,{value:tU.OnlyInfo,children:(0,ew.jsx)(eV.o5,{component:"span",textStyle:"body2",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.installationPreference.onlyInfo"})})})]})}),f.installationPreference&&g.installationPreference&&(0,ew.jsx)(tq.K,{message:g.installationPreference}),(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",gap:"lg",children:[(0,ew.jsx)(tJ._J,{attributes:{"data-testid":"checkbox__indicator"},id:"isAdultAndDataProcessingAuthorized",label:o({id:"solarSimulator.ContactSpecialistForm.checkbox"},{a:function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return(0,ew.jsx)("a",{href:tK.i.DATA_POLICY_PROTECTION,rel:"noreferrer",target:"_blank",children:t})}}),name:"isAdultAndDataProcessingAuthorized"}),(0,ew.jsxs)(eJ.BJ,{flexDirection:"column",children:[(0,ew.jsx)(eS.$n,{disabled:i||p,fullWidth:!0,onClick:()=>{t({email:!0,firstName:!0,installationPreference:!0,isAdultAndDataProcessingAuthorized:!0,lastName:!0,phone:!0})},type:"submit",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.button"})}),c&&(0,ew.jsx)(eS.$n,{disabled:i||p,fullWidth:!0,onClick:async()=>{if(!i&&!p){h(!0);try{await t({email:!0,firstName:!0,installationPreference:!0,isAdultAndDataProcessingAuthorized:!0,lastName:!0,phone:!0},!1);let e=await m();0===Object.keys(e).length?await r(d):await u()}catch(e){}finally{h(!1)}}},type:"button",variant:"outlined",children:(0,ew.jsx)(eX.A,{id:"solarSimulator.ContactSpecialistForm.buttonOrder"})})]})]})]})})]})}})]})})};function tQ(){return(tQ=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e}).apply(null,arguments)}let t0=function(e){return eA.createElement("svg",tQ({xmlns:"http://www.w3.org/2000/svg",width:188,height:115,fill:"none"},e),eu||(eu=eA.createElement("path",{fill:"#15F0B7",d:"m48.716 22.351.035-.206c.912-5.445.593-15.137-5.331-17.862C36.101.917 24.066.009 18.166 0S-.218 4.664.003 16.477c.22 11.813 10.52 16.587 17.269 15.947s19.364-2.677 21.16-1.75 11.008 7.446 13.892 6.629c2.883-.817-1.924-5.55-3.244-7.674-1.536-2.474-.818-4.682-.364-7.278"})),em||(em=eA.createElement("path",{fill:"#fff",d:"M15.29 18.121c.938 0 1.698-1.014 1.698-2.265s-.76-2.265-1.698-2.265c-.939 0-1.7 1.014-1.7 2.265 0 1.25.761 2.265 1.7 2.265M25.482 18.121c.938 0 1.699-1.014 1.699-2.265s-.76-2.265-1.699-2.265c-.938 0-1.699 1.014-1.699 2.265 0 1.25.76 2.265 1.699 2.265M35.109 18.121a2.265 2.265 0 1 0 0-4.53 2.265 2.265 0 0 0 0 4.53"})),eh||(eh=eA.createElement("path",{fill:"#6675F6",d:"M119.989 6.795s6.829 2.173 6.855 8.142a64 64 0 0 1-1.33 7.801l-19.429 84.321s-.338 8.291-8.125 7.233c-7.788-1.057-42.517-5.197-45.551-5.893s-6.745-5.189-5.835-9.532c.91-4.344 45.968-83.885 45.968-83.885z"})),ep||(ep=eA.createElement("path",{fill:"#5840FF",d:"M61.762 33.247 46.585 97.281a5.6 5.6 0 0 0-.047 2.36c.152.78.47 1.521.932 2.173a5.7 5.7 0 0 0 1.75 1.613 5.8 5.8 0 0 0 2.266.775l45.363 5.61a5.85 5.85 0 0 0 4.032-.982 5.67 5.67 0 0 0 2.317-3.39l21.237-91.715a5.6 5.6 0 0 0 .037-2.348 5.6 5.6 0 0 0-.933-2.162 5.7 5.7 0 0 0-1.742-1.605 5.85 5.85 0 0 0-2.255-.775L74.794 1.179a5.85 5.85 0 0 0-4.02.962 5.68 5.68
10 0 0-2.333 3.36z"})),eg||(eg=eA.createElement("path",{fill:"#6675F6",d:"M74.181 104.193a3.963 3.963 0 1 0 .001-7.926 3.963 3.963 0 0 0 0 7.926"})),ef||(ef=eA.createElement("path",{fill:"#100030",d:"m52.097 91.265 48.49 6.132 16.696-73.33 1.633-7.174-48.013-6.7-1.633 7.024z"})),ex||(ex=eA.createElement("path",{fill:"#180048",d:"M96.266 10.192a1.133 1.133 0 1 0 0-2.265 1.133 1.133 0 0 0 0 2.265"})),ev||(ev=eA.createElement("path",{fill:"#FFA26B",d:"M120.555 90.345a90 90 0 0 0 10.132-5.228c4.789-2.942 5.856-2.174 10.084-.44 4.228 1.736 24.282 7.254 33.34 4.222s14.259-9.026 13.869-18.988c-.389-9.962-6.573-19.279-22.625-20.625s-26.831-.486-33.689 3.69c-6.858 4.174-5.942 12.954-5.834 17.66s.131 6.882-2.463 9.297c-2.595 2.414-9.361 12.389-2.814 10.412"})),eb||(eb=eA.createElement("path",{fill:"#fff",d:"M144.398 71.35c1.564 0 2.831-1.521 2.831-3.398 0-1.876-1.267-3.398-2.831-3.398s-2.831 1.522-2.831 3.398 1.267 3.398 2.831 3.398M156.856 72.483a2.831 2.831 0 1 0 0-5.663 2.831 2.831 0 0 0 0 5.663M169.881 73.615c1.876 0 3.397-1.268 3.397-2.832s-1.521-2.831-3.397-2.831c-1.877 0-3.398 1.267-3.398 2.831s1.521 2.832 3.398 2.832"})),ej||(ej=eA.createElement("path",{fill:"#FF48D8",d:"M96.949 55.224c1.25-4.172.509-12.127-10.356-14.12-10.865-1.995-14.002 5.504-14.642 8.756-.855 4.348 2.014 7.204 1.554 8.725a2.94 2.94 0 0 1-1.126 1.451l-.005.003v.001c-.515.346-.962.461-1.022 1.084-.08.82 2.24 1.449 4.034.892a2.86 2.86 0 0 1-1.294.954c-.928.297-1.648.388-1.746.888s2.17 2.227 5 1.47a7 7 0 0 0 1.96-.822l-.009.239c-.012.738.023 2.796 1.885 3.138s2.583-1.325 3.097-2.303q.06-.117.123-.247a6.6 6.6 0 0 0 1.6 1.583c2.344 1.707 5.111.903 5.21.404.098-.5-.538-.84-1.289-1.445a2.8 2.8 0 0 1-.869-1.437c1.44 1.25 3.983 1.526 4.227.71a.92.92 0 0 0-.198-.84q-.088-.152-.213-.276a2.04 2.04 0 0 1-.604-.996 2 2 0 0 1 .05-1.154c.686-1.583 3.68-3.476 4.633-6.658"})))},t1=e=>{let{errorCode:t}=e,{formatMessage:a}=(0,eM.A)();return(0,ew.jsxs)(eR.AC,{fullHeight:!0,theme:"base500",children:[(0,ew.jsx)(eV.o5,{component:"p",textAlign:"center",textStyle:"heading3",children:(0,ew.jsx)(eX.A,{id:t?"solarSimulator.NeedPersonalizedStudy.error.".concat(t):"solarSimulator.NeedPersonalizedStudy.error.default",values:{br:()=>(0,ew.jsx)("br",{})}})}),(0,ew.jsx)(ey.m,{marginTop:"md",children:(0,ew.jsx)(t0,{title:a({id:"solarSimulator.NeedPersonalizedStudy.image"})})})]})},t2=e=>{let{errorCode:t,contactForm:a}=e,{formatMessage:l}=(0,eM.A)();return(0,ew.jsx)(ey.m,{marginX:"auto",maxWidth:1100,children:(0,ew.jsxs)(eR.AC,{borderless:!0,theme:"base900",children:[(0,ew.jsx)(ey.m,{marginBottom:"md",children:(0,ew.jsx)(eV.o5,{color:"tertiary500",textStyle:"display2",children:l({id:"solarSimulator.budgetExceedingConsumption.title"})})}),(0,ew.jsxs)(eJ.BJ,{alignItems:"center",flexDirection:{base:"column",md:"row"},gap:"xxl",justifyContent:"center",children:[(0,ew.jsx)(ey.m,{maxWidth:360,children:(0,ew.jsx)(t1,{errorCode:t})}),(0,ew.jsx)(ey.m,{children:a})]})]})})},t5=e=>{var t,a,l,n;let{serializedState:r}=e,i=(0,eE.useRouter)(),{formatMessage:s}=(0,eM.A)(),[o,c]=(0,eA.useState)(()=>(0,eT.b)(r)),[d,u]=(0,eA.useState)(!1),[m,h]=(0,eA.useState)(!1),[p,g]=(0,eA.useState)(!1),[f,x]=(0,eA.useState)(null),{mutateAsync:v}=(0,eD.fM)({mutation:ez,mutationKey:["solarSimulator","calculateSolarEstimate"]}),{mutateAsync:b}=(0,eI.W)("newLead"),j=(0,eO.o)(o),w=(0,eB.$)(),y=f instanceof eC.MZ?null==(l=f.response.errors)||null==(a=l[0])||null==(t=a.extensions)?void 0:t.errorCode:void 0,S="OE-0204"===y||"OE-0205"===y?y:void 0,C=f?s({id:S?"solarSimulator.NeedPersonalizedStudy.errorMessage.".concat(S):"solarSimulator.NeedPersonalizedStudy.errorMessage.default"}):void 0;(0,eA.useEffect)(()=>{let e=!0,{address:t,completion:a,params:l,quote:n}=o;return l&&!n&&!a&&l.consumption<=e_.ZU&&(g(!0),v({input:{consumption:l.consumption,roofSize:l.roofSize}}).then(t=>{let{calculateSolarEstimate:a}=t;if(e){if(!a)throw Error("No data available from solar estimate");c(e=>e.completion?e:(0,eH.CH)({...e,quote:a}))}}).catch(t=>{e&&x(t)}).finally(()=>{e&&g(!1)})),(null==l?void 0:l.location)&&!t&&!a&&(0,eW.x)({search:l.location,country:"es",locale:"es"}).then(t=>{var a,l;let{features:n}=t;if(!e)return;let r=n.map(e=>{var t,a;return{isAddress:e.id.startsWith("address"),name:(null==(t=e.place_name_es)?void 0:t.trim())||(null==(a=e.place_name)?void 0:a.trim())||""}}),i=(null==(a=r.find(e=>e.isAddress&&e.name))?void 0:a.name)||(null==(l=r.find(e=>e.name))?void 0:l.name)||"";c(e=>e.completion?e:{...e,address:i})}).catch(()=>void 0),()=>{e=!1}},[]);let E=e=>{d||c(t=>(0,eH.CH)("function"==typeof e?e(t):{...t,...e}))};(0,eA.useEffect)(()=>{o.params||o.completion||i.replace(tS.M.Home)},[i,o.completion,o.params]);let A=async(e,t)=>{if(!d){u(!0),h(!1);try{let a=o;if(a.completion){await eL.F.setCookieStateOnClient({state:a}),await i.push((0,eH.$_)(a.completion));return}if((0,eH.AF)(e),t){if(!(0,eH.c5)(a))throw Error("Solar quote is not eligible for direct sale");a={...a,personalData:e,isDirectSale:!0,submittedSteps:[eN.Z.Quote]},c(a),await eL.F.setCookieStateOnClient({state:a}),await eL.F.toNextStep({currentStepName:eN.Z.Quote,router:i,state:a});return}if(!a.params||p)throw Error("Solar estimate is not ready");let l=a.params.consumption>e_.ZU||!a.quote?"personalized":"specialist";a={...a,personalData:e,isDirectSale:!1},await b((0,eH.JC)(a,C)),a={...a,completion:l,submittedSteps:[eN.Z.Quote]},c(a),await eL.F.setCookieStateOnClient({state:a}),await i.push((0,eH.$_)(l))}catch(e){h(!0)}finally{u(!1)}}};if(o.completion)return(0,ew.jsxs)(ey.m,{marginX:"auto",maxWidthPreset:"sm",paddingY:"xxl",children:[m&&(0,ew.jsx)(eP.J,{variant:"embedded"}),(0,ew.jsx)(eS.$n,{disabled:d,fullWidth:!0,onClick:async()=>{await A(o.personalData,!1)}
1,children:s({id:"common.option.button.continue"})})]});if(!o.params||p||!o.quote&&!f&&o.params.consumption<=e_.ZU)return(0,ew.jsx)(ek.D,{subtitleBoard:{id:"solarSimulator.calculatingYourSavings.text"},title:{id:"solarSimulator.calculatingYourSavings.title"},titleBoard:{id:"solarSimulator.calculatingYourSavings.subtitle"}});let M=(0,ew.jsx)(tX,{initialValues:o.personalData,numberOfPanels:null==(n=o.quote)?void 0:n.numberOfPanels,isPending:d,onValuesChange:e=>E({personalData:e}),onSubmit:e=>A(e,!1),onDirectSale:(0,eH.c5)(o)&&!o.completion?e=>A(e,!0):void 0});return(0,ew.jsxs)(ew.Fragment,{children:[m&&(0,ew.jsx)(eP.J,{}),(!!f||o.params.consumption>e_.ZU)&&(0,ew.jsx)(ey.m,{marginTop:{md:"xxl"},children:(0,ew.jsx)(t2,{contactForm:M,errorCode:S})}),(0,ew.jsx)(tN,{state:o,contactForm:M,financedMonthlyPayment:j,surplus:w,loadingQueryNewLead:d,isPending:d,onServiceChange:(e,t)=>E(a=>({...a,services:{...a.services,[e]:t}})),onFinancingChange:e=>E({isFinanced:e}),onFinancedMonthsChange:e=>E({financedMonths:e}),onBack:async()=>{await i.push(o.completion?(0,eH.$_)(o.completion):"/solar/simulador")}})]})};var t3=!0;let t4=e=>{let{serializedState:t}=e,{formatMessage:a}=(0,eM.A)(),l=a({defaultMessage:"Simula tu oferta de paneles solares. Dibuja tu tejado y te daremos la mejor opci\xf3n para tu casa. Genera tu propia energ\xeda 100% verde y ahorra en tu factura de la luz",id:"solarSimulator.description"});return(0,ew.jsxs)(ew.Fragment,{children:[(0,ew.jsx)(eF.p,{description:l,nofollow:!0,noindex:!0,title:a({defaultMessage:"Simula tu instalaci\xf3n solar",id:"solarSimulator.pageTitle"})}),(0,ew.jsx)(t5,{serializedState:t},JSON.stringify(t))]})}},37652:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});var l=function(e){return e.Quote="quote",e.Order="order",e}({})},40313:(e,t,a)=>{"use strict";a.d(t,{f:()=>l});let l=e=>{if(!Number.isInteger(e)||e<=0)return"";if(e<12)return"".concat(e," ").concat(1===e?"mes":"meses");let t=Math.floor(e/12),a=e%12,l="".concat(t," ").concat(1===t?"a\xf1o":"a\xf1os");return 0===a?l:"".concat(l," ").concat(a," ").concat(1===a?"mes":"meses")}},40477:(e,t,a)=>{"use strict";a.d(t,{$:()=>o});var l=a(59974),n=a(61539),r=a(41695),i=a(59528),s=a(45604);let o=()=>{let{locale:e}=(0,n.useRouter)(),t=(0,s.oc)({target:"oe"}),a=(0,r.useMemo)(()=>new Intl.NumberFormat(e,{minimumFractionDigits:2}),[e]),{data:o}=(0,l.I)({...(0,i.Di)(t,{staleTime:864e5,variables:{category:"SOLAR",customerType:"B2C",isHidden:!0,market:"ESP_ELECTRICITY",releaseSelection:"LATEST"}}),select:e=>{var t,a,l,n;return null!=(n=null==(l=e.products)||null==(a=l.find(e=>{var t;return null==e||null==(t=e.code)?void 0:t.includes("OCTOSOLARPREMIUM")}))||null==(t=a.prices)?void 0:t.surplusRate)?n:null}});return"+".concat(a.format(Number(null!=o?o:.07)))}},44449:(e,t,a)=>{"use strict";a.d(t,{x:()=>i,w:()=>s});var l=a(99130),n=a(41695),r=a(71147);let i=async e=>{let{search:t,country:a,locale:n}=e,r=new URLSearchParams({access_token:l._.NEXT_PUBLIC_SOLAR_SIMULATOR_MAP||"",country:a||"",language:n||""});return(await fetch("".concat("https://api.mapbox.com/geocoding/v5/mapbox.places/").concat(t,".json?").concat(r),{method:"GET"})).json()},s=e=>{let{onSelect:t,onReset:a,initialSearchValue:l,locale:s,country:o}=e,[c,d]=(0,n.useState)(!1),[u,m]=(0,n.useState)(""),[h,p]=(0,n.useState)(""),[g]=(0,n.useState)(l),[f,x]=(0,n.useState)(),[v,b]=(0,n.useState)([]),j=(0,n.useCallback)(()=>b([]),[]),w=(0,n.useCallback)(e=>{m(e.currentTarget.value),""===e.currentTarget.value&&j()},[j]),y=(0,n.useCallback)(e=>{j(),x(e),m(()=>e.placeName),null==t||t(e)},[t,j]),S=(0,n.useCallback)(e=>t=>{t.key&&"Enter"!==t.key||y(e)},[y]),C=(0,n.useCallback)(()=>{m(()=>""),d(!1),j(),null==a||a()},[a,j]);return(0,r.A)(()=>{u!==g&&u&&(u!==(null==f?void 0:f.placeName)&&u?p(u):j())},250,[u]),(0,n.useEffect)(()=>{let e=async e=>{var t;let{searchText:a}=e;if(!a)return;let l=await i({country:o,locale:s,search:a});(null==(t=l.features)?void 0:t.length)===0?(d(!0),j()):(d(!1),b(null==l?void 0:l.features.map(e=>{var t;let a=e.place_name.replace("".concat(e.text,", "),""),[l,n]=e.geometry.coordinates,r=null==(t=e.context.find(e=>e.id.includes("postcode")))?void 0:t.text;return{bbox:e.bbox,center:{lat:n,lng:l},id:e.id,isAddress:!!e.address,placeName:e.place_name,postalCode:r||void 0,subtext:a,title:e.text}})))};h&&e({searchText:h})},[o,h,s,j]),[(0,n.useMemo)(()=>({noResults:c,placePredictions:v,search:u}),[c,v,u]),(0,n.useMemo)(()=>({clearSearch:C,handleLocationSearchInputChange:w,handleSelectLocation:S,resetPlacePredictions:j,setSearch:m}),[C,w,S,j])]}},46727:(e,t,a)=>{"use strict";a.d(t,{ZU:()=>l});let l=275},47980:(e,t,a)=>{"use strict";a.d(t,{Z:()=>l});let l={cookieName:"oees-solar-simulator",cookieApiHandlerRoute:"/api/solar-simulator/submit-form",cookieMaxAgeSeconds:86400,financedMonths:[3,6,12,36,60,72,84,96,108,120,144,180,216,240]}},50430:(e,t,a)=>{"use strict";a.d(t,{G:()=>l});let l="5kW"},51004:(e,t,a)=>{"use strict";a.d(t,{g:()=>n,l:()=>r});var l=a(41695);let n=(0,l.createContext)(null),r=()=>{let e=(0,l.useContext)(n);if(!e)throw Error("Cannot use switch context when not inside Switch");return e}},53156:(e,t,a)=>{"use strict";a.d(t,{N:()=>l});let l=(e,t)=>
1t.reduce((t,a)=>Math.abs(a-e)<Math.abs(t-e)?a:t)},54714:(e,t,a)=>{"use strict";a.d(t,{W:()=>c});var l=a(20140),n=a(37905),r=a(9084),i=a(83841),s=a(9080);let o={fastSales:{leadSource:"Fast Sales",leadStatus:"Fast Sales",product:"Solar"},newLead:{leadSource:"Web - Simulador Solar",leadStatus:"Nuevo Lead",product:"Solar"}};function c(e,t){let a=(0,r.Kr)();return(0,n.n)({mutationFn:async t=>{let n=(0,s.Kd)(),r=(null==n?void 0:n.salesChannel)||(null==n?void 0:n.salesSubchannel)||(null==n?void 0:n.campaign)?{campaign:n.campaign||"",salesChannel:n.salesChannel||"",salesSubchannel:n.salesSubchannel||""}:a,c=await fetch(i.Q.solarLead,{body:JSON.stringify({...t,...o[e],...(null==r?void 0:r.salesChannel)&&{channel:r.salesChannel},...(null==r?void 0:r.salesSubchannel)&&{subChannel:r.salesSubchannel},...(null==r?void 0:r.campaign)&&{campaign:r.campaign}}),method:"POST"});if(!c.ok){let e="Failed to register the Solar lead";throw l.Cp(e),Error(e)}return c.json()},...t})}},55052:(e,t,a)=>{"use strict";a.d(t,{b:()=>h,s:()=>m});var l=a(83067),n=a(47980),r=a(37652),i=a(10569);let s=l.ai().finite(),o=s.int(),c=e=>l.Ik({basicInstallation:e,withBattery:e,withBatteryAndSolarWallet:e,withSolarWallet:e}).strict(),d=l.Ik({batteryPrice:s.nullable(),chargerPrice:s.nullable(),co2Emissions:l.Ik({carKms:o.nullable(),flightsAvoided:o.nullable(),treesPlanted:o.nullable()}).strict().nullable(),governmentSubsidiesMultiplier:s.nullable(),numberOfPanels:o,panelPower:s,panelPowerUnit:l.Yj(),postInstallationMultipliers:c(s.nullable()).nullable(),priceUnit:l.Yj(),totalPanelPrice:s,totalPower:s,totalPowerUnit:l.Yj(),twentyFiveYearSavingsMultipliers:c(o.nullable()).nullable()}).strict(),u=l.Ik({address:l.Yj(),completion:l.k5(["specialist","order","personalized"]).nullable(),directSale:l.Ik({cups:l.Yj(),dni:l.Yj()}).strict().optional(),financedMonths:o.nonnegative(),isDirectSale:l.zM(),isFinanced:l.zM(),params:l.Ik({consumption:s,roofSize:s,location:l.Yj(),houseType:l.Yj()}).strict().optional(),personalData:l.Ik({email:l.Yj(),firstName:l.Yj(),installationPreference:l.Yj(),isAdultAndDataProcessingAuthorized:l.zM(),lastName:l.Yj(),p
1hone:l.Yj()}).strict(),quote:d.optional(),services:i.J.strict(),submittedSteps:l.YO(l.fc(r.Z))}).strict().refine(e=>e.isFinanced?n.Z.financedMonths.some(t=>t===e.financedMonths):0===e.financedMonths,{message:"Financing must use an available period, or zero when disabled",path:["financedMonths"]}),m=e=>{let{params:t,quote:a,directSale:l,...n}=u.parse(e);return{...n,...void 0===t?{}:{params:t},...void 0===a?{}:{quote:a},...void 0===l?{}:{directSale:l}}},h=e=>u.parse(e)},57257:(e,t,a)=>{"use strict";a.d(t,{$g:()=>i,V_:()=>n,ZV:()=>r});let l=e=>{let t=e;return"string"==typeof e&&(t=parseFloat(e)),!Number.isNaN(t)},n=function(e){let{locale:t="es-ES",...a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e)?new Intl.NumberFormat(t,a).format(e/100):"n/a"},r=function(e){let{locale:t="es-ES",round:a=!1,...n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("en"===t&&(t="en-GB"),l(e)){let l=a?Math.round("string"==typeof e?parseFloat(e):e):e;return n.currency&&(n.style="currency"),new Intl.NumberFormat(t,{...n}).format(l)}return"n/a"},i=function(e,t){let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"de-DE",l=new Intl.NumberFormat(a).format(e);return t?"".concat(l," ").concat(t):l}},59475:(e,t,a)=>{"use strict";a.d(t,{o:()=>d});var l=a(59109),n=a(59974),r=a(342),i=a(45604);let s=(0,r.U)("\n query RetailFinanceInstalmentsForTag($tag: String!, $amount: Decimal!) {\n retailFinanceInstalmentsForTag(tag: $tag, amount: $amount) {\n productName\n instalments {\n numberOfInstalments\n pricePerInstalment\n }\n }\n }\n");function o(e,t){return(0,l.j)({enabled:!!t.tag&&!!t.amount&&Number(t.amount)>0,queryFn:()=>e.request(s,t),queryKey:["retailFinanceInstalmentsForTag",t]})}function c(e){let{variables:t,select:a}=e,l=(0,i.oc)({target:"oe"});return(0,n.I)({...o(l,t),select:e=>{let t=e.retailFinanceInstalmentsForTag;return a?a(t):t}})}function d(e){var t,a,l;let{quote:n,services:r,financedMonths:i}=e,{data:s}=c({select:e=>((e,t)=>{let a=((e,t)=>{if(e)for(let a of e){let e=a.instalments.find(e=>e.numberOfInstalments===t);if(e)return{pricePerInstalment:e.pricePerInstalment,productName:a.productName}}})(e,t);if(!a)return;let l=a.productName.toUpperCase().includes("GFH")?200/t:0;return Math.round((a.pricePerInstalment+l)*100)/100})(e,i),variables:{amount:String((null!=(t=null==n?void 0:n.totalPanelPrice)?t:0)+(r.withBattery&&null!=(a=null==n?void 0:n.batteryPrice)?a:0)+(r.withCarCharger&&null!=(l=null==n?void 0:n.chargerPrice)?l:0)),tag:"solar"}});return s}c.queryOptions={retailFinanceInstalmentsForTag:o}},59528:(e,t,a)=>{"use strict";a.d(t,{Di:()=>c,QT:()=>d,vs:()=>o,wu:()=>s});var l=a(59109),n=a(59974),r=a(342),i=a(45604);let s=["products"],o=(0,r.U)("\n query Products($category: Category, $customerType: CustomerType, $isHidden: Boolean, $market: ProductMarket, $productCode: String, $releaseSelection: ProductReleaseSelection) {\n products(category: $category, customerType: $customerType, isHidden: $isHidden, market: $market, productCode: $productCode, releaseSelection: $releaseSelection) {\n code\n displayName\n id\n isHidden\n marketName\n notes\n params {\n productType\n fixedType\n }\n prices {\n dailyFee\n dailyFeeWithTaxes\n fixedTerm\n fixedTermUnits\n fixedTermWithTaxes\n marginTerm\n marginTermUnits\n marginTermWithTaxes\n surplusRate\n surplusRateUnits\n variableTerm\n variableTermUnits\n variableTermWithTaxes\n }\n }\n }\n");function c(e,t){let{variables:a,...n}=t||{variables:{}};return(0,l.j)({queryFn:()=>e.request(o,a),queryKey:[...s,a],select:e=>e.products.filter(e=>!!e),...n})}function d(e){let t=(0,i.oc)({target:"oe"});return(0,n.I)(c(t,e))}d.queryOptions=c},70687:(e,t,a)=>{"use strict";a.d(t,{K:()=>n});var l=a(57257);let n=(e,t,a,n)=>{var r;let i=null!=(r=a[((e,t)=>e&&t?"withBatteryAndSolarWallet":e?"withBattery":t?"withSolarWallet":"basicInstallation")(e,t)])?r:0;return(0,l.ZV)(n*i,{locale:"de-DE"})}},71147:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});var l=a(41695);function n(e,t,a){void 0===t&&(t=0),void 0===a&&(a=[]);var n,r,i,s,o,c,d,u=(void 0===(n=t)&&(n=0),r=(0,l.useRef)(!1),i=(0,l.useRef)(),s=(0,l.useRef)(e),o=(0,l.useCallback)(function(){return r.current},[]),c=(0,l.useCallback)(function(){r.current=!1,i.current&&clearTimeout(i.current),i.current=setTimeout(function(){r.current=!0,s.current()},n)},[n]),d=(0,l.useCallback)(function(){r.current=null,i.current&&clearTimeout(i.current)},[]),(0,l.useEffect)(function(){s.current=e},[e]),(0,l.useEffect)(function(){return c(),d},[n]),[o,d,c]),m=u[0],h=u[1],p=u[2];return(0,l.useEffect)(p,a),[m,h]}},76878:(e,t,a)=>{"use strict";a.d(t,{p:()=>l.p});var l=a(57739)},82193:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/solar/simulador/presupuesto",function(){return a(35196)}])},85633:(e,t,a)=>{"use strict";a.d(t,{D:()=>u});var l=a(64255),n=a(11164),r=a(48210),i=a(19612),s=a(23585),o=a(2318);let c=(0,a(13520).AH)({backgroundColor:"#DDF7F6",borderRadius:"{borderRadius.base}"}),d=e=>{let{titleBoard:t,subtitleBoard:a}=e,{formatMessage:s}=(0,o.A)();return(0,l.jsx)(n.m,{maxWidth:540,minHeight:500,position:"relative",top:-78,zIndex:0,children:(0,l.jsx)("div",{className:c,children:(0,l.jsx)(n.m,{paddingBottom:{base:"sm",md:"md"},paddingTop:{base:"xxxl"},paddingX:{base:"sm",md:"md"},children:(0,l.jsxs)(r.BJ,{flexDirection:"column",children:[(0,l.jsx)(i.o5,{color:"base900",component:"p",textAlign:"center",textStyle:"heading2",children:s(t)}),(0,l.jsx)(i.o5,{color:"base900",component:"p",textAlign:"center",textStyle:"heading3",children:s(a)})]})})})})},u=e=>{let{title:t,titleBoard:a,subtitleBoard:c,loop:u=!0}=e,{formatMessage:m}=(0,o.A)();return(0,l.jsx)(n.m,{marginTop:"none",marginX:"auto",maxWidth:540,minWidth:340,paddingX:"sm",children:(0,l.jsxs)(r.BJ,{alignItems:"center",flexDirection:"column",gap:"none",justifyContent:"center",children:[(0,l.jsx)(n.m,{marginBottom:"mdLg",children:(0,l.jsx)(i.o5,{component:"h1",textAlign:"center",textStyle:"heading2",children:m(t)})}),(0,l.jsx)(n.m,{fullWidth:!0,maxWidth:250,minHeight:240,zIndex:1,children:(0,l.jsx)(s.p,{animation:"constantineCalculating",loop:u,removePlayPauseControls:!0,size:250})}),(0,l.jsx)(d,{subtitleBoard:c,titleBoard:a})]})})}},94655:(e,t,a)=>{"use strict";a.d(t,{A:()=>x});var l=a(19866),n=a(48210),r=a(48083),i=a(66504),s=a(203),o=a(2486),c=a(94502);let d=(0,c.z)("slider",{},[]),u={},m=Object.keys(u),h=Object.assign((0,o.ph)(d.recipeFn),{__recipe__:!0,__name__:"StyledSlider",__getCompoundVariantCss__:d.__getCompoundVariantCss__,raw:e=>e,variantKeys:m,variantMap:u,merge(e){return(0,c.q)(this,e)},splitVariantProps:e=>(0,o.rg)(e,m),getVariantProps:d.getVariantProps});var p=a(52729),g=a(41695),f=a(64255);let x=e=>{let{ariaLabel:t,value:a,defaultValue:o,disabled:c,error:d,errorMessage:u,getAr
1iaValueText:m,isAnimated:x,label:b,max:j,min:w,name:y,onBlur:S,onChange:C,optional:E,showLabels:A,step:M,valueLabelDisplay:F,valueLabelFormat:k}=(0,l.Y)({props:e,defaultProps:v}),P=(0,g.useId)(),_=(0,g.useId)(),B=(0,g.useRef)(null),[I,D]=(0,g.useState)(o??w),z=void 0===a?I:a,O=!!b&&A,[W,N]=(0,g.useState)(!1),[T,H]=(0,g.useState)(!1),[L,q]=(0,g.useState)(!1),J=(0,g.useCallback)(e=>{D(e),C?.(e)},[C]),R=(0,g.useCallback)(()=>{J(Math.max(w,z-M))},[z,J,w,M]),U=(0,g.useCallback)(()=>{J(Math.min(j,z+M))},[z,J,j,M]),V=(0,g.useCallback)(()=>{J(w)},[J,w]),Y=(0,g.useCallback)(()=>{J(j)},[J,j]),Z={ArrowLeft:R,ArrowDown:R,PageDown:R,ArrowRight:U,ArrowUp:U,PageUp:U,Home:V,End:Y},$=m?.(z)??String(z),G=(0,g.useMemo)(()=>{switch(F){case"auto":return L||T||W;case"on":return!0;default:return!1}},[T,L,W,F]),K=(0,g.useCallback)(e=>{let t=e*(j-w)+w,a=(t-w)%M;return Math.max(w,Math.min(t-a+(a>M/2?M:0),j))},[j,w,M]),X=(0,g.useCallback)(e=>{let t=B.current?.getBoundingClientRect();if(t){if(e<=t.x)return void V();if(e>=t.x+t.width)return void Y();J(K((e-t.x)/t.width))}},[J,K,Y,V]),Q=(0,g.useCallback)(e=>{X(e.clientX)},[X]),ee=(0,g.useCallback)(()=>{H(!0);let e=e=>{window.requestAnimationFrame(()=>{X(e.clientX)})},t=()=>{H(!1),window.removeEventListener("pointermove",e),window.removeEventListener("pointerup",t)};window.addEventListener("pointermove",e),window.addEventListener("pointerup",t)},[X]),et=`${(z-w)/(j-w)*100}%`,{optionalIndicator:ea}=(0,p.t)(),el=h({}),en=d&&u?(0,r.m)(u):void 0;return(0,f.jsx)("fieldset",{className:el,"data-part":"slider-root","data-disabled":c,"data-dragover":T,"data-animated":x,children:(0,f.jsxs)(n.BJ,{flexDirection:"column",gap:"md",children:[(0,f.jsxs)("div",{"data-part":"slider-group",children:[O&&(0,f.jsx)("div",{"data-part":"slider-column",children:(0,f.jsxs)("label",{"data-part":"slider-label",id:P,htmlFor:_,children:[b,E?` (${ea})`:""]})}),(0,f.jsx)("div",{"data-part":"slider-control-column",children:(0,f.jsxs)("div",{"data-part":"slider-control",ref:B,children:[(0,f.jsx)("input",{"data-part":"slider-hidden-input",type:"hidden",name:y,value:z,disabled:c,"aria-describedby":en}),(0,f.jsx)("div",{"data-part":"slider-rail",role:"presentation","data-testid":"slider__rail--base",onClick:Q,"data-animated":x}),(0,f.jsx)("div",{"data-part":"slider-value-rail",style:{width:et},role:"presentation","data-testid":"slider__rail--value",onClick:Q,"data-animated":x}),(0,f.jsx)("div",{"data-part":"slider-thumb",role:"slider",id:_,"aria-valuemax":j,"aria-valuemin":w,"aria-valuenow":z,"aria-valuetext":$,"aria-disabled":c,"aria-label":t,...O?{"aria-labelledby":P}:{"aria-label":b},style:{left:et},tabIndex:c?-1:0,onKeyDown:e=>{e.code in Z&&(e.preventDefault(),(0,Z[e.code])())},onPointerDown:ee,onFocus:()=>{q(!0)},onBlur:e=>{q(!1),S?.(e)},onMouseEnter:()=>{N(!0)},onMouseLeave:()=>{N(!1)},"data-animated":x,children:(0,f.jsx)(s.b,{hidden:"off"===F,children:(0,f.jsx)("div",{"data-part":"slider-thumb-tooltip","data-visible":G,role:"presentation","data-testid":"slider__thumb__tooltip","data-animated":x,children:k?k(z):z})})})]})}),O&&(0,f.jsx)("div",{"data-part":"slider-output-column",children:(0,f.jsx)("label",{"data-testid":"slider-output-label","data-part":"slider-output-label",htmlFor:_,children:k?k(z):z})})]}),(0,f.jsx)(s.b,{attributes:{role:"alert"},hidden:!d,children:d&&u&&(0,f.jsx)(i.K,{message:u})})]})})};x.displayName="Slider";let v={ariaLabel:"Slider control",disabled:!1,error:!1,isAnimated:!0,max:100,min:0,optional:!1,showLabels:!0,step:1,valueLabelDisplay:"auto"}},97916:(e,t,a)=>{"use strict";a.d(t,{A:()=>l});let l={src:"/_next/static/media/background.ffc5b018.webp",height:593,width:1506,blurDataURL:"data:image/webp;base64,UklGRngAAABXRUJQVlA4WAoAAAAQAAAABwAAAgAAQUxQSBkAAAAAHikDABQABA5dtdOsptP+zP/////////+AFZQOCA4AAAAkAEAnQEqCAADAAJAOCWoAALnWbhUAP78twIE/GjZpom9TWP4XycJKx//uEL3vuZ9UFnuzuYQAAA=",blurWidth:8,blurHeight:3}}},e=>{e.O(0,[8796,4374,6791,9324,8990,636,4812,8792],()=>e(e.s=82193)),_N_E=e.O()}]);
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.