1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3894],{24383:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/form",function(){return n(20532)}])},20532:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return eR}});var a=n(85893),s=n(9008),o=n.n(s),r=n(20125),i=n(67294),c=n(42140),l=n(17334),d=n(11163),u=n(82580),m=n(74231),p=n(58482),h=n(90948),x=n(48263),g=n(87357),f=n(47041),b=n(5828),y=n(21929);let j={createFormResponse:_,createFull:w,getFormResponse:Z,update:k};async function _(e){let t={session_id:e.sessionId,answers:JSON.stringify(e.answers)};return await y.M.post("form/response/".concat(e.formId),t,{headers:{"Content-Type":"application/json"}}).then(function(e){return 201==e.status&&e})}async function w(e){let t={answers:e.answers,session_id:e.sessionId};return await y.M.post("form/response/".concat(e.formId),t,{headers:{"Content-Type":"application/json"}}).then(function(e){return 201==e.status&&e.data})}async function Z(e){return await y.M.get("form/response/".concat(e,"?"),{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){return 200==e.status&&e.data}).catch(function(){return!1})}async function k(e,t,n){let a={answers:t};return n&&(a.project_id=n),await y.M.put("form/response/".concat(e),a,{headers:{"Content-Type":"application/json"}}).then(function(e){return 200==e.status&&e.data})}var v=n(37103),S=n(23972),N=n(2734),P=n(62623),C=n(37786),T=n(28492),A=n(13056),E=n.n(A),R=n(57354),I=n(15450);let z=(0,h.ZP)(S.Z)(e=>{let{theme:t}=e;return"\n color: ".concat(t.colors.primary.main,";\n font-size: ").concat(t.typography.pxToRem(20),";\n line-height: ").concat(t.typography.pxToRem(24),";\n padding: ").concat(t.spacing(0,1,0,0),";\n ")});var q=e=>{let{styles:t}=e,{translate:n}=(0,v.ZK)(),s=(0,N.Z)(),{partner:o,partnerCustomizationRules:r}=(0,i.useContext)(I.N),c=(0,i.useRef)(null),[l,d]=(0,i.useState)(0),[u,m]=(0,i.useState)(0),[p,h]=(0,i.useState)(5),f=e=>(0,a.jsxs)(x.ZP,{container:!0,sx:{py:3},children:[(0,a.jsx)(x.ZP,{item:!0,xs:1,children:(0,a.jsx)(R.Z,{sx:{color:s.colors.primary.main}})}),(0,a.jsx)(x.ZP,{item:!0,xs:11,children:(0,a.jsx)(z,{variant:"h4",children:n("calculator.banner.item_".concat(e,".title"))})})]},e),b=(e,t)=>{let n=Math.ceil(p/t);return Array.from({length:n},(e,t)=>t+1).map((t,a)=>{let s=n*e+a;
1if(s<p)return f(s)})},y=()=>{if(c.current.clientHeight>775)d(0),m(1);else{let e=p;c.current&&c.current.clientHeight&&(e=Math.ceil(p/Math.floor(c.current.clientHeight/130))),d(2e4/(e="number"==typeof e&&e>=1&&e<=p?e:p)),m(e)}};return(0,i.useEffect)(()=>(y(),window.addEventListener("resize",y),()=>{window.removeEventListener("resize",y)}),[]),(0,a.jsxs)(P.Z,{className:t.banner,sx:{display:"flex",flexDirection:"column",width:"100%",ml:2},children:[(0,a.jsxs)(g.Z,{className:t.media,children:[(0,a.jsx)(g.Z,{className:t.bg_image}),(0,a.jsx)(g.Z,{className:t.logo,sx:{pt:2,pl:4},children:(0,a.jsx)(C.Z,{href:r("texts","logo-link"),title:o(),children:(0,a.jsx)("div",{className:t.logo_img})})}),(0,a.jsx)("h2",{dangerouslySetInnerHTML:{__html:n("calculator.banner.subtitle",{parnerName:o()})}})]}),(0,a.jsx)(T.Z,{sx:{flex:"auto"},ref:c,children:(0,a.jsx)(E(),{activeIndicatorIconButtonProps:{style:{color:s.colors.primaryAlt.main,opacity:.8}},indicatorContainerProps:{style:{position:"absolute",bottom:0}},indicatorIconButtonProps:{style:{padding:10,color:s.colors.primary.main,opacity:.8}},interval:l,navButtonsAlwaysInvisible:!0,sx:{height:"100%"},children:Array.from({length:u},(e,t)=>t+1).map((e,t)=>b(t,u))})})]})},M=n(69397),B=function(e){let{formik:t,styles:n}=e,{translate:s}=(0,v.ZK)(),o="TEUAAAAGACDYAAEG",[r,l]=(0,i.useState)({}),[d,u]=(0,i.useState)(!0),{getBlock:m,handleSubmit:p,setCurrentBlockByNextOrder:h,updateBlockQuestionsValuesFromFormik:f}=(0,i.useContext)(c.o),{partner:y,partnerCustomizationRules:j}=(0,i.useContext)(I.N),_=j("sections","show_powered_by_nido"),w=async e=>{e&&await await f(r,t).then(async()=>{await h(r)})},Z=async()=>{await p(t,r).then(async e=>{await w(e)})},k=async e=>{"Enter"==e.key&&(e.preventDefault(),Z())};return(0,i.useEffect)(()=>(document.addEventListener("keydown",k),()=>document.removeEventListener("keydown",k)),[]),(0,i.useEffect)(()=>
1{l(m(o)),u(!1)},[o]),(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(x.ZP,{className:n.first_step,container:!0,sx:{py:2,px:{xs:1,sm:2}},children:(0,a.jsx)(x.ZP,{item:!0,xs:12,children:(0,a.jsxs)(P.Z,{sx:{margin:"auto",maxWidth:"1170px"},children:[(0,a.jsxs)(g.Z,{className:n.media,children:[(0,a.jsx)(g.Z,{className:n.bg_image}),(0,a.jsx)(g.Z,{className:n.logo,sx:{pt:2,pl:4},children:(0,a.jsx)(C.Z,{href:j("texts","logo-link"),title:y(),children:(0,a.jsx)("div",{className:n.logo_img})})}),_&&(0,a.jsx)(g.Z,{className:n.powered_by_nido,sx:{pl:4},children:s("offer.powered_by_nido")}),(0,a.jsx)("h2",{dangerouslySetInnerHTML:{__html:s("calculator.subtitle")}}),(0,a.jsx)("h3",{dangerouslySetInnerHTML:{__html:s("calculator.subtitle-2")}})]}),(0,a.jsx)(T.Z,{children:(0,a.jsx)(x.ZP,{container:!0,children:(0,a.jsx)(x.ZP,{item:!0,xs:12,sm:10,md:8,sx:{margin:"auto"},children:!d&&(0,a.jsxs)(g.Z,{children:[(0,a.jsx)(b.HO,{block:r,formik:t}),(0,a.jsx)(g.Z,{sx:{py:2},className:"".concat(n.button_container),children:(0,a.jsx)(M.Z,{type:"button",variant:"contained",onClick:Z,className:"".concat(n.button),children:s("calculator.buttons.start-form")})})]},o)})})})]})})})})},F=n(41796);let L=(0,h.ZP)(x.ZP)(e=>{let{theme:t}=e;return"\n display: none;\n\n @media (min-width: ".concat(t.breakpoints.values.sm,"px) {\n display: inherit;\n position: fixed;\n position: -webkit-fixed;\n bottom: 0;\n right: 0;\n z-index: 6;\n color: ").concat(t.header.textColor,";\n background-color: ").concat(t.colors.alpha.white[100],";\n }\n @media (min-width: ").concat(t.breakpoints.values.md,"px) {\n display: none;\n }\n ")}),O=(0,h.ZP)(S.Z)(e=>{let{theme:t}=e;return"\n color: ".concat(t.colors.primary.main,";\n font-size: ").concat(t.typography.pxToRem(14),";\n line-height: ").concat(t.typography.pxToRem(18),";\n padding: ").concat(t.spacing(2),";\n ")});var U=e=>{let{}=e,{translate:t}=(0,v.ZK)(),n=(0,N.Z)();return(0,a.jsx)(L,{container:!0,children:(0,a.jsx)(x.ZP,{item:!0,xs:12,sx:{backgroundColor:(0,F.Fq)(n.colors.primary.main,.05)},children:(0,a.jsx)(E(),{indicators:!1,interval:4e3,navButtonsAlwaysInvisible:!0,sx:{height:"100%",borderTop:"1px solid "+n.colors.alpha.black[10]},children:Array.from({length:6},(e,t)=>t+1).map((e,s)=>(0,a.jsxs)(x.ZP,{container:!0,sx:{minHeight:n.header.height},children:[(0,a.jsx)(x.ZP,{item:!0,sm:.6,children:(0,a.jsx)(R.Z,{sx:{ml:2,mt:1.8,color:n.colors.primary.main}})}),(0,a.jsx)(x.ZP,{item:!0,xs:12,sm:11.4,children:(0,a.jsx)(O,{children:t("calculator.banner.item_".concat(s,".title"))})})]},s))})})})},D=n(64666),H=e=>{let{className:t,styles:n}=e,{translate:s}=(0,v.ZK)(),o=(0,N.Z)(),{partnerCustomizationRules:r}=(0,i.useContext)(I.N),[c,l]=(0,i.useState)(0);return(0,i.useEffect)(()=>{if(c){let e=setInterval(()=>{l(e=>"number"!=typeof e||e>=100?5:e+6)},1500);return()=>{clearInterval(e)}}},[c]),(0,i.useEffect)(()=>
1{l(10)},[]),(0,a.jsx)(D.Z,{fullScreen:!0,open:!0,className:"".concat(t),children:(0,a.jsx)(g.Z,{sx:{flexGrow:1,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,a.jsxs)(x.ZP,{container:!0,spacing:2,sx:{pb:4,textAlign:"center"},className:"".concat(n.processing_dialog),children:[(0,a.jsx)(x.ZP,{item:!0,xs:12,children:(0,a.jsx)(g.Z,{className:"".concat(n.background_img),sx:{py:0,px:2}})}),(0,a.jsx)(x.ZP,{item:!0,xs:10,md:8,sx:{margin:"auto"},children:(0,a.jsx)(S.Z,{variant:"h3",sx:{my:2,color:"".concat(o.colors.alpha.black[100]),textTransform:"uppercase"},children:s("calculator.calculating-screen.title")})}),(0,a.jsx)(x.ZP,{item:!0,xs:10,md:8,sx:{margin:"auto"},children:r("sections","show_we_are_calculating_quote")&&(0,a.jsx)(S.Z,{variant:"body1",sx:{color:"".concat(o.colors.alpha.black[100]),fontSize:"20px"},children:s("calculator.calculating-screen.we-are-calculating-quote")})}),(0,a.jsx)(x.ZP,{item:!0,xs:10,md:8,sx:{margin:"auto"},children:(0,a.jsx)(S.Z,{variant:"body1",sx:{color:"".concat(o.colors.alpha.black[100]),fontSize:"20px",fontWeight:"bold"},dangerouslySetInnerHTML:{__html:r("texts","modify-text-just-seconds")||s("calculator.calculating-screen.just-seconds")}})}),(0,a.jsx)(x.ZP,{item:!0,xs:10,md:8,sx:{margin:"auto"},children:(0,a.jsx)(b.gb,{type:"linear",progress:c,showProgress:!1,sx:{mt:4}})})]})})})},K=n(45697),G=n.n(K),J=n(37645),W=n(54799),V=n(35713),Q=n(50594);let X=(0,h.ZP)(D.Z)(e=>{let{theme:t}=e;return"\n & .MuiDialogContent-root {\n padding-top: ".concat(t.spacing(0),";\n padding-bottom: ").concat(t.spacing(0),";\n padding-left: ").concat(t.spacing(1),";\n padding-right: ").concat(t.spacing(1),";\n }\n\n .MuiModal-backdrop{\n background-color: transparent;\n }\n\n .MuiDialogTitle-root{\n padding-top: ").concat(t.spacing(1),";\n padding-bottom: ").concat(t.spacing(1),";\n font-size: 22px;\n }\n ")});function Y(e){let{BlockComponent:t,blockNumber:n,styles:s}=e,{translate:o}=(0,v.ZK)(),r=(0,N.Z)(),[l,d]=(0,i.useState)(!1),{partnerCustomizationRules:u}=(0,i.useContext)(I.N),{setShowPopupContact:m,getShowPopupContact:p}=(0,i.useContext)(c.o);return(0,i.useEffect)(()=>{d(!1),(0,f.hasCookie)("cmplz_banner_visible")&&(0,f.getCookie)("cmplz_banner_visible")&&d(!0)}),(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(X,{"aria-labelledby":"customized-dialog-title",open:p(),sx:{mb:l?0:9.2},className:"partner_styles ".concat(s.partner_styles),children:[(0,a.jsx)(J.Z,{sx:{m:0,p:2},id:"customized-dialog-title",children:(0,a.jsxs)(g.Z,{sx:{py:0,color:"".concat(r.colors.primary.main),display:"flow",fontWeight:"bold",minWidth:"340px"},children:[o("calculator.block-".concat(n,".title")),(!u("sections","contact_details_hardcoded")||8!=n)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("br",{}),(0,a.jsx)(g.Z,{sx:{fontWeight:"normal",fontSize:r.typography.pxToRem(16),lineHeight:r.spacing(2.5),display:"block"},component:"span",dangerouslySetInnerHTML:{__html:o("calculator.block-".concat(n,".subtitle"))}})]})]})}),(0,a.jsx)(W.Z,{"aria-label":"close",onClick:()=>{m(!1)},sx:{position:"absolute",right:8,top:8,color:e=>e.palette.grey[500]},children:(0,a.jsx)(Q.Z,{})}),(0,a.jsx)(V.Z,{dividers:!0,children:t})]})})}Y.propTypes={BlockComponent:G().node.isRequired,blockNumber:G().number.isRequired};var $=n(80940);let ee=(0,h.ZP)(g.Z)(()=>"\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n "),et=(0,h.ZP)(W.Z)(e=>{let{theme:t}=e;return"\n color: ".concat((0,F.Fq)(t.colors.secondary.main,.7),";\n\n &:hover{\n color: ").concat((0,F.Fq)(t.colors.secondary.main,1),";\n text-decoration: none;\n cursor:pointer;\n }\n\n &:visited{\n text-decoration: none;\n }\n")});function en(e){let{blockNumber:t,handleEdit:n,block:s}=e,{translate:o}=(0,v.ZK)(),r=(0,N.Z)();return(0,a.jsxs)(ee,{"data-index":t,children:[(0,a.jsx)(S.Z,{variant:"h3",sx:{fontSize:r.typography.pxToRem(18),color:r.colors.secondary.main},children:o("calculator.".concat(s.slug,".title"))}),(0,a.jsx)(et,{onClick:n,children:(0,a.jsx)($.Z,{fontSize:"large"})})]})}en.propTypes={blockNumber:G().number.isRequired,handleEdit:G().func.isRequired,block:G().object.isRequired};let ea=(0,h.ZP)(S.Z)(e=>{let{}=e;return"\n display: flex;\n justify-content: space-between;\n"});function es(e){let{blockNumber:t,block:n,buttonText:s,formik:o,handleContinue:r,showTitle:c,step:l,styles:d,sx:u,lastStepPosition:m}=e,{translate:p}=(0,v.ZK)(),h=(0,N.Z)(),{partnerCustomizationRules:x}=(0,i.useContext)(I.N);return(0,a.jsxs)(g.Z,{sx:null!=u?u:{},children:[c&&(0,a.jsxs)(ea,{variant:"h3",sx:{py:0,color:"".concat(h.colors.secondary.main),fontSize:h.typography.pxToRem(26),fontWeight:"bold",paddingRight:1,paddingTop:1},children:[(0,a.jsx)("span",{children:p("calculator.".concat(n.slug,".title"))}),(0,a.jsxs)("span",{children:[l,"/",m-2]})]}),(!x("sections","contact_details_hardcoded")||t!=m&&x("sections","contact_details_hardcoded"))&&(0,a.jsx)(b.HO,{block:n,formik:o}),(0,a.jsx)(g.Z,{sx:{pt:2,textAlign:"center",width:"100%"},children:(0,a.jsx)(M.Z,{className:d.button,type:"button",variant:"contained",onClick:r,sx:{dis
1play:{xs:l!=m-1?"none":"inline-flex",sm:"inline-flex"}},children:p(null!=s?s:"calculator.buttons.continue")})})]})}es.propTypes={blockNumber:G().number.isRequired,block:G().object.isRequired,buttonText:G().string,formik:G().object.isRequired,handleContinue:G().func.isRequired,showTitle:G().bool,step:G().number,sx:G().object},es.defaultProps={showTitle:!0,step:1};var eo=n(67720);function er(e){let{blockId:t,buttonText:n,formik:s,position:o,showTitle:r,styles:l,sx:d,lastStepPosition:u}=e,m=(0,N.Z)(),[p,h]=(0,i.useState)(!1),[x,g]=(0,i.useState)({}),[f,y]=(0,i.useState)(!0),{executeBlockInnerBlocksActions:j,getBlock:_,handleSubmit:w,isOpenBlockView:Z,setCurrentBlockByNextOrder:k,setShowPopupContact:v,updateBlockQuestionsValuesFromFormik:S}=(0,i.useContext)(c.o),P=async e=>{if(e)try{switch(o){case u:await S(x,s).then(async()=>{Z(x.id)||await k(x)});break;case u-1:h(!0),await S(x,s).then(async()=>{await j(x).then(async()=>{Z(x.id)?v(!0):await k(x).then(async()=>{v(!0)})})});break;default:await S(x,s).then(async()=>{await j(x).then(()=>{h(!0)}),Z(x.id)||await k(x)})}}catch(e){console.log("updateBlockView: "+e)}},C=async()=>{try{await w(s,x).then(async e=>{await P(e)})}catch(e){console.log("handleContinue: "+e)}};return(0,i.useEffect)(()=>{g(_(t)),y(!1)},[t]),f?(0,a.jsx)(b.gb,{size:"1.5rem"}):p?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(en,{blockNumber:o,block:x,handleEdit:()=>h(!1)}),(0,a.jsx)(eo.Z,{sx:{mt:1,mb:1.5}})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(es,{blockNumber:o,block:x,buttonText:n,formik:s,handleContinue:C,showTitle:r,step:o-1,styles:l,sx:null!=d?d:{},lastStepPosition:u}),8!=o&&(0,a.jsx)(eo.Z,{sx:{background:{xs:m.colors.alpha.white[100],sm:(0,F.Fq)(m.palette.divider,.08)},borderColor:{xs:m.colors.alpha.white[100],sm:(0,F.Fq)(m.palette.divider,.08)},mt:3,mb:1.5}})]})}er.propTypes={blockId:G().string.isRequired,buttonText:G().string,formik:G().object.isRequired,position:G().number.isRequired,showTitle:G
1().bool,sx:G().object,lastStepPosition:G().number.isRequired},er.defaultProps={buttonText:"calculator.buttons.continue",showTitle:!0};let ei=e=>{let{formik:t,styles:n}=e,[s,o]=(0,i.useState)(!0),[r,l]=(0,i.useState)({}),[d,u]=(0,i.useState)(""),[m,p]=(0,i.useState)(null),{getBlocks:h,getCurrentBlock:g,getShowFinishingButton:f,setShowPopupContact:y}=(0,i.useContext)(c.o),j=()=>{let e=h();if(e){let t={};Object.keys(e).forEach((n,a)=>{a>0&&a<Object.keys(e).length-1&&(t[a+1]=e[n].id),a==Object.keys(e).length-1&&(u(e[n].id),p(a+1))}),l(t)}o(!1)};return(0,i.useEffect)(()=>{s&&j()},[s]),!s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(x.ZP,{container:!0,sx:{py:{xs:2,md:0}},children:[Object.keys(r).map(function(e,s){return g().order>=e&&(0,a.jsx)(x.ZP,{item:!0,sx:{display:{xs:g().order==e?"block":"none",sm:"block"},px:{xs:2,md:4},width:"100%"},children:(0,a.jsx)(er,{blockId:r[e],formik:t,position:parseInt(e),styles:n,lastStepPosition:m})},s)}),f()&&(0,a.jsx)(x.ZP,{item:!0,sx:{px:{xs:2,md:4},width:"100%"},children:(0,a.jsx)(b.fr,{buttonText:"calculator.buttons.finish",className:n.button,handleEvent:()=>{y(!0)},sx:{display:{xs:"none",sm:"inline-flex"}}})},Object.keys(r).length)]}),(0,a.jsx)(Y,{BlockComponent:(0,a.jsx)(er,{blockId:d,buttonText:"calculator.buttons.send",formik:t,position:parseInt(Object.keys(r)[Object.keys(r).length-1])+1,showTitle:!1,styles:n,sx:{pt:1,pb:3,px:2},lastStepPosition:m}),blockNumber:8,styles:n})]})};ei.propTypes={formik:G().object.isRequired};var ec=n(20724),el=n(13379);let ed=(0,h.ZP)(M.Z)("\n border: 0;\n padding-left: 0;\n padding-right: 0;\n\n &:hover {\n border: 0;\n }\n "),eu=(0,h.ZP)(x.ZP)(e=>{let{theme:t}=e;return"\n width: 100%;\n position: fixed;\n position: -webkit-fixed;\n bottom: 0;\n right: 0;\n z-index: 6;\n background-color: ".concat(t.colors.alpha.white[100],";\n border-top: ").concat(t.colors.alpha.black[10]," solid 2px;\n\n @media (min-width: ").concat(t.breakpoints.values.sm,"px) {\n display: none;\n }\n ")}),em=(0,h.ZP)(x.ZP)(e=>{let{theme:t}=e;return"\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 50px;\n width: 100%;\n color: ".concat(t.header.textColor,";\n ")}),ep=e=>{let{formik:t,lastStep:n}=e,{translate:s}=(0,v.ZK)(),[o,r]=(0,i.useState)(!1),{executeBlockInnerBlocksActions:l,getCurrentBlock:d,handleSubmit:u,isOpenBlockView:m,setCurrentBlockByBackOrder:p,setCurrentBlockByNextOrder:h,setShowPopupContact:x,updateBlockQuestionsValuesFromFormik:b}=(0,i.useContext)(c.o),y=async()=>{try{await p(d())}catch(e){console.log("handleBack navigation: "+e)}},j=async()=>{try{await u(t,d()).then(async e=>{await _(e)})}catch(e){console.log("handleContinue navigation: "+e)}},_=async e=>{if(e)try{let e=d();switch(e.order){case n:await b(e,t).then(async()=>{m(e.id)||await h(e)});break;case n-1:await b(e,t).then(async()=>{await l(e).then(async()=>{m(e.id)?x(!0):await h(e).then(async()=>{x(!0)})})});break;default:await b(e,t).then(async()=>{await l(e),await h(e)})}}catch(e){console.log("updateBlockView navigation: "+e)}};return(0,i.useEffect)(()=>{r(!1),(0,f.hasCookie)("cmplz_banner_visible")&&(0,f.getCookie)("cmplz_banner_visible")&&r(!0)}),(0,a.jsx)(eu,{children:(0,a.jsxs)(em,{sx:{mb:o?0:9.2},children:[2>=d().order?(0,a.jsx)(g.Z,{}):(0,a.jsx)(ed,{color:"primary",onClick:y,size:"small",startIcon:(0,a.jsx)(ec.Z,{}),sx:{m:2},variant:"outlined",children:s("calculator.buttons.back")}),(0,a.jsx)(ed,{color:"primary",endIcon:(0,a.jsx)(el.Z,{}),onClick:j,size:"small",sx:{m:2},variant:"outlined",children:s(d().order>=7?"calculator.buttons.finish":"calculator.buttons.forward")})]})})};ep.propTypes={formik:G().object.isRequired};let eh={getForm:ex};async function ex(e){let t="form/"+e.formId;return""!=e.utm&&(t+="?utm_source="+e.utm),await y.M.get(t,{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){return 200==e.status&&e}).catch(function(){return!1})}var eg=n(48553),ef=n.n(eg),eb=n(91364),ey=n(93443);let ej={air_to_water:"SGUAANB4FA2TJ888",air_to_air:"NCUQACAANABASBG8"},e_={air_to_water:"air_to_water",air_to_air:"air_to_air"},ew={step_technology:"U1DECPUFGAKZAAJG"};var eZ=n(12188);async function ek(){console.log("[getPartnerUtmSource] Client-side, location:",{hostname:window.location.hostname,search:window.location.search});let e=new URLSearchParams(window.location.search),t=e.get("utm_source");if(t&&""!==t)return console.log("[getPartnerUtmSource] â
Using URL parameter (priority 1):",t),t;console.log("[getPartnerUtmSource] No URL parameter, checking configuration...");let n=await (0,eZ.IP)();if(null==n?void 0:n.utmSource){let e=n.utmSource;return console.log("[getPartnerUtmSource] â
Using configuration (priority 2):",e),e}return console.log("[getPartnerUtmSource] â ï¸ No UTM source found, returning empty string"),""}var ev=function(e){let{handleTechnology:t,styles:n}=e,{translate:s}
1=(0,v.ZK)(),{partner:o,partnerCustomizationRules:r}=(0,i.useContext)(I.N),l=r("sections","show_powered_by_nido"),{getFormValidationRules:d,removeFormValidationRules:p}=(0,i.useContext)(c.o),[h,f]=(0,i.useState)(null),[y,j]=(0,i.useState)(!0),_=async()=>{try{let e=await ek()||"no-utm",n=await eh.getForm({formId:ew.step_technology,utm:e}),a=n.data.data.attributes.questions;a&&(n.data.data.id!=ew.step_technology&&t(ej.air_to_water,a),a[0]&&a[0].attributes&&a[0].innerBlocks[0].attributes&&a[0].innerBlocks[0].attributes.choices&&a[0].innerBlocks[0].attributes.choices.length>1&&(a[0].innerBlocks[0].attributes.choices.splice(1,1),a[0].innerBlocks[0].attributes.length&&(a[0].innerBlocks[0].attributes.length=a[0].innerBlocks[0].attributes.choices.length)),f(a[0]),j(!1))}catch(e){console.error(e),j(!1)}},w=(0,u.TA)({initialValues:{},validationSchema:m.Ry().shape(d()),onSubmit:async(e,n)=>{let a=ej.air_to_water;e["input-9JBAABGUAAGNA2A8"]===e_.air_to_air&&(a=ej.air_to_air),p("input-9JBAABGUAAGNA2A8"),t(a)}});return(0,i.useEffect)(()=>{y&&_()},[y]),(0,a.jsx)(a.Fragment,{children:y||!h?(0,a.jsx)(g.Z,{sx:{margin:"0 auto",paddingTop:10},children:(0,a.jsx)(b.gb,{size:"3.5rem"})}):(0,a.jsx)(x.ZP,{className:n.first_step,container:!0,sx:{py:2,px:{xs:1,sm:2}},children:(0,a.jsx)(x.ZP,{item:!0,xs:12,children:(0,a.jsxs)(P.Z,{sx:{margin:"auto",maxWidth:"1170px"},children:[(0,a.jsxs)(g.Z,{className:n.media,children:[(0,a.jsx)(g.Z,{className:n.bg_image}),(0,a.jsx)(g.Z,{className:n.logo,sx:{pt:2,pl:4},children:(0,a.jsx)(C.Z,{href:r("texts","logo-link"),title:o(),children:(0,a.jsx)("div",{className:n.logo_img})})}),l&&(0,a.jsx)(g.Z,{className:n.powered_by_nido,sx:{pl:4},children:s("offer.powered_by_nido")}),(0,a.jsx)("h2",{dangerouslySetInnerHTML:{__html:s("calculator.subtitle")}})]}),(0,a.jsx)(T.Z,{children:(0,a.jsx)(x.ZP,{container:!0,children:(0,a.jsx)(x.ZP,{item:!0,xs:12,sm:7,md:5,sx:{margin:"auto"},children:(0,a.jsxs)(g.Z,{children:[(0,a.jsx)(ey.Z,{block:h,formik:w}),(0,a.jsx)(g.Z,{sx:{py:2},className:"".concat(n.button_container),children:(0,a.jsx)(M.Z,{type:"button",onClick:()=>w.submitForm(),variant:"contained",className:"".concat(n.button),children:s("calculator.buttons.select-technology")})})]})})})})]})})})})};let eS={getPartnerCss:eN};async function eN(e){return await y.M.get("/partners/form/".concat(e,"/css"),{headers:{"Content-Type":"multipart/form-data"}}).then(function(e){return 200==e.status&&e.data}).catch(function(){return!1})}let eP=(0,h.ZP)(x.ZP)(e=>{let{theme:t}=e;return"\n height: 100dvh;\n margin-left: auto;\n margin-right: auto;\n padding-bottom: ".concat(t.spacing(0),";\n padding-left: ").concat(t.spacing(0),";\n padding-top: ").concat(t.spacing(0),";\n\n @media (min-width: ").concat(t.breakpoints.values.sm,"px) {\n padding-top: ").concat(t.header.height,";\n }\n\n &.headerToSM {\n @media (min-width: ").concat(t.breakpoints.values.sm,"px) {\n padding-bottom: ").concat(t.spacing(4),";\n }\n }\n\n &.headerToMD {\n @media (min-width: ").concat(t.breakpoints.values.sm,"px) {\n padding-bottom: ").concat(t.header.height,";\n }\n\n @media (min-width: ").concat(t.breakpoints.values.md,"px) {\n padding-bottom: ").concat(t.spacing(4),";\n padding-left: ").concat(t.spacing(0),";\n }\n }\n ")}),eC=(0,h.ZP)(g.Z)(()=>"\n height: 100dvh;\n width: 100%;\n ");var eT=()=>{let e=(0,d.useRouter)(),t=(0,l.e)(),{translate:n}=(0,v.ZK)(),{applyFallbacks:s,getCurrentBlock:o,getBlocks:r,getFormInitialValues:h,getFormValidationRules:y,getSessionId:_,getQuestionBySlug:w,handleSubmit:Z,initialize:k,isFinished:S,updateBlockQuestionsValuesFromFormik:N,setCurrentBlockByNextOrder:P,setProfile:C,setUtmCookie:T}=(0,i.useContext)(c.o),[A,E]=(0,i.useState)(!0),[R,z]=(0,i.useState)(!1),[M,F]=(0,i.useState)(""),[L,O]=(0,i.useState)(0),[D,K]=(0,i.useState)(!1),[G,J]=(0,i.useState)(!1),[W,V]=(0,i.useState)(""),[Q,X]=(0,i.useState)(""),[Y,$]=(0,i.useState)({}),[ee,et]=(0,i.useState)(ef().partner_styles),{init:en}=(0,i.useContext)(I.N);(0,i.useEffect)(()=>{0!=L&&O(o().order)},[o(),L]),(0,i.useEffect)(()=>{e.isReady&&R&&!A&&eo()},[R,e.isReady]),(0,i.useEffect)(()=>{e.isReady&&A&&er()},[A,e.isReady]),(0,i.useEffect)(()=>{J(!1),(0,f.hasCookie)("cmplz_banner_visible")&&(0,f.getCookie)("cmplz_banner_visible")&&J(!0)}),(0,i.useEffect)(()=>
1{if(1!=L)return document.addEventListener("keydown",es),()=>document.removeEventListener("keydown",es)},[L]);let ea=(0,u.TA)({initialValues:h(),validationSchema:m.Ry().shape(y()),onSubmit:async(e,t)=>{let n=o(),a=S();1!=n.order||a||await N(n,ea).then(async()=>{await P(n)}),S()&&el({})}}),es=async e=>{"Enter"==e.key&&1!=L&&(e.preventDefault(),await Z(ea,o()))},eo=async()=>{try{C(p.v.private_person);let e=await ek()||"no-utm",n=await eh.getForm({formId:M,utm:e}),a=n.data.data.attributes.quote.json;t()&&a&&await eu(a,M)}catch(e){console.error(e),E(!1)}},er=async()=>{try{let e=await ek()||"no-utm",t=await eS.getPartnerCss(e);if(t.data&&Object.keys(t.data.attributes.json).length>0){let e=t.data.attributes;X(e.partner_id);let n=(0,eb.LJ)(e.json);(0,eb.pB)(n),$((0,eb.rz)(e.json)),V(e.partner_name)}E(!1),K(!1),R&&!A&&eo()}catch(e){console.error(e),E(!1)}};(0,i.useEffect)(()=>{""!=W&&en(W,Q,Y)},[W]);let ec=async()=>{let e=await ek();if(e){let t=window.location.origin;if(window.parent!==window)try{t=window.parent.location.origin}catch(e){console.warn("No se puede acceder al parent frame debido a pol\xedticas de seguridad:",e)}let n="".concat(t,"/form/?utm_source=").concat(e);return n}return""},el=async a=>{try{await T().then(async()=>{K(!0);let n=s(),a=_(),o=await j.createFormResponse({answers:n,formId:M,sessionId:a});if(t()&&(null==o?void 0:o.data)){sessionStorage.setItem("innerNavToQuote",o.data.data.id);let t={calc:o.data.data.id};"9LDAAD2AXSJSEAA8"==Q&&(t={...t,pid:Q}),e.push({pathname:"/quote",query:t})}})}catch(t){var o,r;if(null===(o=t.response)||void 0===o?void 0:null===(r=o.data)||void 0===r?void 0:r.errors){K(!1),ea.setStatus({success:!1}),ea.setErrors({submit:t.message}),ea.setSubmitting(!1);let e=t.response.data.errors;e.details.map(e=>{ea.setFieldError(ed(e.name),"email"==e.name?n("package_form_response.errors.".concat(e.name)):n("package_form_response.errors.default"))})}else e.push({pathname:"/500",query:"retry=1"})}},ed=e=>{if("email"===e){let t=w("contact-email");e="input-".concat(t.id)}return e},eu=async(e,t)=>{await k(e,t,!0,await ec()).then(async()=>{z(!1),O(1),K(!1)})};return A||R?(0,a.jsx)(g.Z,{sx:{margin:"0 auto",paddingTop:10},children:(0,a.jsx)(b.gb,{size:"3.5rem"})}):D?(0,a.jsx)(H,{className:"partner_styles ".concat(ee),styles:ef()}):(0,a.jsx)(eC,{className:"partner_styles ".concat(ee),children:(0,a.jsx)("form",{noValidate:!0,onSubmit:Z,children:0==L||1==L?(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(eP,{className:"headerToSM",container:!0,sx:{maxWidth:"1170px",overflow:"auto"},children:0==L?(0,a.jsx)(ev,{styles:ef(),handleTechnology:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;t?(F(e),eu(t,e)):(F(e),z(!0))}}):(0,a.jsx)(B,{formik:ea,styles:ef()})})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(eP,{className:"headerToMD",container:!0,sx:{maxWidth:"1170px"},children:[(0,a.jsx)(x.ZP,{item:!0,xs:6,sx:{display:{xs:"none",md:"inherit"}},children:(0,a.jsx)(q,{styles:ef()})}),(0,a.jsx)(x.ZP,{item:!0,xs:12,md:6,sx:{height:"100%",flex:1,overflow:"auto",pb:G?0:9.2},children:(0,a.jsx)(ei,{formik:ea,styles:ef()})})]}),(0,a.jsx)(ep,{formik:ea,lastStep:r()?r().length:0}),(0,a.jsx)(U,{})]})})})},eA=function(){return(0,a.jsx)(c.N,{children:(0,a.jsx)(eT,{})})};function eE(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o(),{children:(0,a.jsx)("title",{children:"Nido - Calculadora"})}),(0,a.jsx)(eA,{})]})}eE.getLayout=e=>(0,a.jsx)(r.Z,{children:e});var eR=eE},20125:function(e,t,n){"use strict";var a=n(85893),s=n(45697),o=n.n(s),r=n(87357);let i=e=>{let{children:t}=e;return(0,a.jsx)(r.Z,{sx:{display:"flex",flex:1,height:"100%"},children:t})};i.propTypes={children:o().node},t.Z=i},91364:function(e,t,n){"use strict";n.d(t,{LJ:function(){return a},pB:function(){return o},rz:function(){return s}});let a=e=>{let t=["colors","fonts","images","template","styles"],n=[];return Object.entries(e).forEach(e=>{Object.entries(e[1]).map(a=>{let[s,o]=a;t.includes(e[0])&&("images"==e[0]?n.push("--".concat(e[0],"-").concat(s,": url(").concat(o,");")):n.push("--".concat(e[0],"-").concat(s,": ").concat(o,";")),"colors"==e[0]&&"background"==s&&n.push("body { background-color: ".concat(o,"; }")),"fonts"==e[0]&&"font"==s&&n.push("body { font-family: '".concat(o,"'; }")))})}),n.join("\n")},s=e=>{let t=["pages","sections","template","texts","urls"],n={};
1return Object.entries(e).forEach(e=>{t.includes(e[0])&&(n[e[0]]={},Object.entries(e[1]).map(t=>{let[a,s]=t;n[e[0]][a]=s}))}),n},o=e=>{let t=document.createElement("style");t.textContent=":root{".concat(e,"}"),document.head.appendChild(t)}},48553:function(e){e.exports={partner_styles:"form_partner_styles__Of_tF",button:"form_button__p2QnD",media:"form_media__zMqzi",bg_image:"form_bg_image__632fZ",logo:"form_logo__MjMpC",logo_img:"form_logo_img__Vsm5N",powered_by_nido:"form_powered_by_nido__uAoMR",first_step:"form_first_step__qRdhQ",button_container:"form_button_container__1KNdb",banner:"form_banner__T7yz7",processing_dialog:"form_processing_dialog__tKvwD",background_img:"form_background_img__igQ3J"}}},function(e){e.O(0,[6700,7235,5748,3309,4959,9774,2888,179],function(){return e(e.s=24383)}),_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.